mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 01:10:20 -06:00
remove root Makefile and get rid of cd in drone ci
This commit is contained in:
46
.drone.star
46
.drone.star
@@ -267,8 +267,7 @@ def testing(ctx, module):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd %s' % (module),
|
||||
'make vet',
|
||||
'make -C %s vet' % (module),
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
@@ -282,8 +281,7 @@ def testing(ctx, module):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd %s' % (module),
|
||||
'make staticcheck',
|
||||
'make -C %s staticcheck' % (module),
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
@@ -297,8 +295,7 @@ def testing(ctx, module):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd %s' % (module),
|
||||
'make lint',
|
||||
'make -C %s lint' % (module),
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
@@ -312,9 +309,8 @@ def testing(ctx, module):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd %s' % (module),
|
||||
'make test',
|
||||
'mv coverage.out %s_coverage.out' % (module),
|
||||
'make -C %s test' % (module),
|
||||
'mv %s/coverage.out %s_coverage.out' % (module, module),
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
@@ -331,7 +327,7 @@ def testing(ctx, module):
|
||||
'from_secret': 'cache_s3_endpoint'
|
||||
},
|
||||
'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}'),
|
||||
'path_style': True,
|
||||
'strip_prefix': module,
|
||||
@@ -466,8 +462,7 @@ def localApiTests(ctx, coreBranch = 'master', coreCommit = '', storage = 'ownclo
|
||||
'PATH_TO_CORE': '/srv/app/testrunner',
|
||||
},
|
||||
'commands': [
|
||||
'cd ocis',
|
||||
'make test-acceptance-api',
|
||||
'make -C ocis test-acceptance-api',
|
||||
],
|
||||
'volumes': [{
|
||||
'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()),
|
||||
},
|
||||
'commands': [
|
||||
'cd /srv/app/testrunner',
|
||||
'make test-acceptance-api',
|
||||
'make -C /srv/app/testrunner test-acceptance-api',
|
||||
],
|
||||
'volumes': [{
|
||||
'name': 'gopath',
|
||||
@@ -923,8 +917,7 @@ def binary(ctx, name):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd ocis',
|
||||
'make release-%s' % (name),
|
||||
'make -C ocis release-%s' % (name),
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
@@ -938,8 +931,7 @@ def binary(ctx, name):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd ocis',
|
||||
'make release-finish',
|
||||
'make -C ocis release-finish',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
@@ -1128,8 +1120,7 @@ def changelog(ctx):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd ocis',
|
||||
'make changelog',
|
||||
'make -C ocis changelog',
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -1269,7 +1260,7 @@ def docs(ctx):
|
||||
generateConfigDocs = []
|
||||
|
||||
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 {
|
||||
'kind': 'pipeline',
|
||||
@@ -1284,7 +1275,7 @@ def docs(ctx):
|
||||
'name': 'prepare',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'make docs-copy'
|
||||
'make -C docs docs-copy'
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -1302,15 +1293,16 @@ def docs(ctx):
|
||||
'name': 'test',
|
||||
'image': 'owncloudci/hugo:0.71.0',
|
||||
'commands': [
|
||||
'cd hugo',
|
||||
'cd docs/hugo',
|
||||
'hugo',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'list',
|
||||
'name': 'list and remove temporary files',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'tree hugo/public',
|
||||
'rm -rf docs/hugo',
|
||||
],
|
||||
},
|
||||
{
|
||||
@@ -1380,8 +1372,7 @@ def generate(module):
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd %s' % (module),
|
||||
'make generate',
|
||||
'make -C %s generate' % (module),
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
@@ -1592,8 +1583,7 @@ def build():
|
||||
'image': 'webhippie/golang:1.14',
|
||||
'pull': 'always',
|
||||
'commands': [
|
||||
'cd ocis',
|
||||
'make build',
|
||||
'make -C ocis build',
|
||||
],
|
||||
'volumes': [
|
||||
{
|
||||
|
||||
56
Makefile
56
Makefile
@@ -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.
|
||||
11
docs/Makefile
Normal file
11
docs/Makefile
Normal file
@@ -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',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'make docs-copy'
|
||||
'make -C docs docs-copy'
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'test',
|
||||
'image': 'webhippie/hugo:latest',
|
||||
'commands': [
|
||||
'cd hugo',
|
||||
'cd docs/hugo',
|
||||
'hugo',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'list',
|
||||
'name': 'list and remove temporary files',
|
||||
'image': 'owncloudci/alpine:latest',
|
||||
'commands': [
|
||||
'tree hugo/public',
|
||||
'tree docs/hugo/public',
|
||||
'rm -rf docs/hugo',
|
||||
],
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user