remove root Makefile and get rid of cd in drone ci
This commit is contained in:
+18
-28
@@ -267,8 +267,7 @@ def testing(ctx, module):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd %s' % (module),
|
'make -C %s vet' % (module),
|
||||||
'make vet',
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
@@ -282,8 +281,7 @@ def testing(ctx, module):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd %s' % (module),
|
'make -C %s staticcheck' % (module),
|
||||||
'make staticcheck',
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
@@ -297,8 +295,7 @@ def testing(ctx, module):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd %s' % (module),
|
'make -C %s lint' % (module),
|
||||||
'make lint',
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
@@ -312,9 +309,8 @@ def testing(ctx, module):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd %s' % (module),
|
'make -C %s test' % (module),
|
||||||
'make test',
|
'mv %s/coverage.out %s_coverage.out' % (module, module),
|
||||||
'mv coverage.out %s_coverage.out' % (module),
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
@@ -331,7 +327,7 @@ def testing(ctx, module):
|
|||||||
'from_secret': 'cache_s3_endpoint'
|
'from_secret': 'cache_s3_endpoint'
|
||||||
},
|
},
|
||||||
'bucket': 'cache',
|
'bucket': 'cache',
|
||||||
'source': '%s/%s_coverage.out' % (module, module),
|
'source': '%s_coverage.out' % (module),
|
||||||
'target': '%s/%s/coverage' % (ctx.repo.slug, ctx.build.commit + '-${DRONE_BUILD_NUMBER}'),
|
'target': '%s/%s/coverage' % (ctx.repo.slug, ctx.build.commit + '-${DRONE_BUILD_NUMBER}'),
|
||||||
'path_style': True,
|
'path_style': True,
|
||||||
'strip_prefix': module,
|
'strip_prefix': module,
|
||||||
@@ -466,8 +462,7 @@ def localApiTests(ctx, coreBranch = 'master', coreCommit = '', storage = 'ownclo
|
|||||||
'PATH_TO_CORE': '/srv/app/testrunner',
|
'PATH_TO_CORE': '/srv/app/testrunner',
|
||||||
},
|
},
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd ocis',
|
'make -C ocis test-acceptance-api',
|
||||||
'make test-acceptance-api',
|
|
||||||
],
|
],
|
||||||
'volumes': [{
|
'volumes': [{
|
||||||
'name': 'gopath',
|
'name': 'gopath',
|
||||||
@@ -523,8 +518,7 @@ def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, n
|
|||||||
'EXPECTED_FAILURES_FILE': '/drone/src/ocis/tests/acceptance/expected-failures-on-%s-storage.txt' % (storage.upper()),
|
'EXPECTED_FAILURES_FILE': '/drone/src/ocis/tests/acceptance/expected-failures-on-%s-storage.txt' % (storage.upper()),
|
||||||
},
|
},
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd /srv/app/testrunner',
|
'make -C /srv/app/testrunner test-acceptance-api',
|
||||||
'make test-acceptance-api',
|
|
||||||
],
|
],
|
||||||
'volumes': [{
|
'volumes': [{
|
||||||
'name': 'gopath',
|
'name': 'gopath',
|
||||||
@@ -923,8 +917,7 @@ def binary(ctx, name):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd ocis',
|
'make -C ocis release-%s' % (name),
|
||||||
'make release-%s' % (name),
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
@@ -938,8 +931,7 @@ def binary(ctx, name):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd ocis',
|
'make -C ocis release-finish',
|
||||||
'make release-finish',
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
@@ -1128,8 +1120,7 @@ def changelog(ctx):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd ocis',
|
'make -C ocis changelog',
|
||||||
'make changelog',
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1269,7 +1260,7 @@ def docs(ctx):
|
|||||||
generateConfigDocs = []
|
generateConfigDocs = []
|
||||||
|
|
||||||
for module in config['modules']:
|
for module in config['modules']:
|
||||||
generateConfigDocs += ['cd /drone/src/%s' % (module), 'make config-docs-generate']
|
generateConfigDocs.append('make -C %s config-docs-generate' % (module))
|
||||||
|
|
||||||
return {
|
return {
|
||||||
'kind': 'pipeline',
|
'kind': 'pipeline',
|
||||||
@@ -1284,7 +1275,7 @@ def docs(ctx):
|
|||||||
'name': 'prepare',
|
'name': 'prepare',
|
||||||
'image': 'owncloudci/alpine:latest',
|
'image': 'owncloudci/alpine:latest',
|
||||||
'commands': [
|
'commands': [
|
||||||
'make docs-copy'
|
'make -C docs docs-copy'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1302,15 +1293,16 @@ def docs(ctx):
|
|||||||
'name': 'test',
|
'name': 'test',
|
||||||
'image': 'owncloudci/hugo:0.71.0',
|
'image': 'owncloudci/hugo:0.71.0',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd hugo',
|
'cd docs/hugo',
|
||||||
'hugo',
|
'hugo',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'list',
|
'name': 'list and remove temporary files',
|
||||||
'image': 'owncloudci/alpine:latest',
|
'image': 'owncloudci/alpine:latest',
|
||||||
'commands': [
|
'commands': [
|
||||||
'tree hugo/public',
|
'tree hugo/public',
|
||||||
|
'rm -rf docs/hugo',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -1380,8 +1372,7 @@ def generate(module):
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd %s' % (module),
|
'make -C %s generate' % (module),
|
||||||
'make generate',
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
@@ -1592,8 +1583,7 @@ def build():
|
|||||||
'image': 'webhippie/golang:1.14',
|
'image': 'webhippie/golang:1.14',
|
||||||
'pull': 'always',
|
'pull': 'always',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd ocis',
|
'make -C ocis build',
|
||||||
'make build',
|
|
||||||
],
|
],
|
||||||
'volumes': [
|
'volumes': [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,56 +0,0 @@
|
|||||||
SHELL := bash
|
|
||||||
NAME := ocis
|
|
||||||
IMPORT := github.com/owncloud/$(NAME)
|
|
||||||
HUGO := hugo
|
|
||||||
|
|
||||||
.PHONY: all
|
|
||||||
all: build
|
|
||||||
|
|
||||||
.PHONY: sync
|
|
||||||
sync:
|
|
||||||
go mod download
|
|
||||||
|
|
||||||
.PHONY: clean
|
|
||||||
clean:
|
|
||||||
rm -rf $(HUGO)
|
|
||||||
|
|
||||||
.PHONY: docs-copy
|
|
||||||
docs-copy:
|
|
||||||
mkdir -p $(HUGO); \
|
|
||||||
mkdir -p $(HUGO)/content/; \
|
|
||||||
cd $(HUGO); \
|
|
||||||
git init; \
|
|
||||||
git remote rm origin; \
|
|
||||||
git remote add origin https://github.com/owncloud/owncloud.github.io; \
|
|
||||||
git fetch --depth=1; \
|
|
||||||
git checkout origin/source -f; \
|
|
||||||
rsync -ax --delete ../docs/ content/; \
|
|
||||||
|
|
||||||
.PHONY: config-docs-generate
|
|
||||||
config-docs-generate:
|
|
||||||
go run github.com/owncloud/flaex >| docs/configuration.md
|
|
||||||
|
|
||||||
.PHONY: docs-build
|
|
||||||
docs-build:
|
|
||||||
cd $(HUGO); hugo
|
|
||||||
|
|
||||||
.PHONY: docs
|
|
||||||
docs: docs-copy docs-build
|
|
||||||
|
|
||||||
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
|
|
||||||
|
|
||||||
.PHONY: test-acceptance-api
|
|
||||||
test-acceptance-api: vendor-bin/behat/vendor
|
|
||||||
BEHAT_BIN=$(BEHAT_BIN) $(PATH_TO_CORE)/tests/acceptance/run.sh --remote --type api
|
|
||||||
|
|
||||||
vendor/bamarni/composer-bin-plugin: composer.lock
|
|
||||||
composer install
|
|
||||||
|
|
||||||
vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
|
|
||||||
composer bin behat install --no-progress
|
|
||||||
|
|
||||||
vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
|
|
||||||
@echo behat composer.lock is not up to date.
|
|
||||||
|
|
||||||
composer.lock: composer.json
|
|
||||||
@echo composer.lock is not up to date.
|
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
.PHONY: docs-copy
|
||||||
|
docs-copy:
|
||||||
|
mkdir -p hugo/content/; \
|
||||||
|
cd hugo; \
|
||||||
|
git init; \
|
||||||
|
git remote rm origin; \
|
||||||
|
git remote add origin https://github.com/owncloud/owncloud.github.io; \
|
||||||
|
git fetch --depth=1; \
|
||||||
|
git checkout origin/source -f; \
|
||||||
|
rsync -ax --delete --exclude hugo/ --exclude Makefile ../. content/; \
|
||||||
@@ -625,22 +625,23 @@ def website(ctx):
|
|||||||
'name': 'prepare',
|
'name': 'prepare',
|
||||||
'image': 'owncloudci/alpine:latest',
|
'image': 'owncloudci/alpine:latest',
|
||||||
'commands': [
|
'commands': [
|
||||||
'make docs-copy'
|
'make -C docs docs-copy'
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'test',
|
'name': 'test',
|
||||||
'image': 'webhippie/hugo:latest',
|
'image': 'webhippie/hugo:latest',
|
||||||
'commands': [
|
'commands': [
|
||||||
'cd hugo',
|
'cd docs/hugo',
|
||||||
'hugo',
|
'hugo',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'name': 'list',
|
'name': 'list and remove temporary files',
|
||||||
'image': 'owncloudci/alpine:latest',
|
'image': 'owncloudci/alpine:latest',
|
||||||
'commands': [
|
'commands': [
|
||||||
'tree hugo/public',
|
'tree docs/hugo/public',
|
||||||
|
'rm -rf docs/hugo',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user