From 3a6c96baf410046809a30131c0478d22dc1ba643 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Tue, 1 Dec 2020 09:16:39 +0100 Subject: [PATCH] fix volumes --- .drone.star | 57 ++++++++++++++++++++++++++++------------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/.drone.star b/.drone.star index 6ca39ac3cfb..a7642d00963 100644 --- a/.drone.star +++ b/.drone.star @@ -420,7 +420,7 @@ def localApiTests(ctx, coreBranch = 'master', coreCommit = '', storage = 'ownclo }, 'steps': restoreBuildArtifactCache(ctx, 'ocis-binary-amd64', 'ocis/bin/ocis') + - ocisServer(storage, accounts_hash_difficulty) + + ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + cloneCoreRepos(coreBranch, coreCommit) + [ { 'name': 'localApiTests-%s-%s' % (suite, storage), @@ -467,7 +467,7 @@ def coreApiTests(ctx, coreBranch = 'master', coreCommit = '', part_number = 1, n }, 'steps': restoreBuildArtifactCache(ctx, 'ocis-binary-amd64', 'ocis/bin/ocis') + - ocisServer(storage, accounts_hash_difficulty) + + ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + cloneCoreRepos(coreBranch, coreCommit) + [ { 'name': 'oC10ApiTests-%s-storage-%s' % (storage, part_number), @@ -528,7 +528,7 @@ def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '', }, 'steps': restoreBuildArtifactCache(ctx, 'ocis-binary-amd64', 'ocis/bin/ocis') + - ocisServer(storage, accounts_hash_difficulty) + [ + ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [ { 'name': 'webUITests', 'image': 'owncloudci/nodejs:11', @@ -556,21 +556,23 @@ def uiTestPipeline(ctx, suiteName, phoenixBranch = 'master', phoenixCommit = '', 'yarn install-all', 'yarn run acceptance-tests-drone' ], - 'volumes': [{ - 'name': 'uploads', - 'path': '/uploads' - }] + 'volumes': + [stepVolumeOC10Tests] + + [{ + 'name': 'uploads', + 'path': '/uploads' + }] }, ], 'services': redis() + selenium(), - 'volumes': [ - { + 'volumes': + [pipelineVolumeOC10Tests] + + [{ 'name': 'uploads', 'temp': {} - } - ], + }], 'depends_on': getPipelineNames([buildOcisBinaryForTesting(ctx)]), 'trigger': { 'ref': [ @@ -592,7 +594,7 @@ def accountsUITests(ctx, phoenixBranch, phoenixCommit, storage = 'owncloud', acc }, 'steps': restoreBuildArtifactCache(ctx, 'ocis-binary-amd64', 'ocis/bin/ocis') + - ocisServer(storage, accounts_hash_difficulty) + [ + ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [ { 'name': 'WebUIAcceptanceTests', 'image': 'owncloudci/nodejs:11', @@ -623,10 +625,12 @@ def accountsUITests(ctx, phoenixBranch, phoenixCommit, storage = 'owncloud', acc 'yarn install --all', 'make test-acceptance-webui' ], - 'volumes': [{ - 'name': 'uploads', - 'path': '/uploads' - }], + 'volumes': + [stepVolumeOC10Tests] + + [{ + 'name': 'uploads', + 'path': '/uploads' + }] }, ], 'services': [ @@ -650,12 +654,12 @@ def accountsUITests(ctx, phoenixBranch, phoenixCommit, storage = 'owncloud', acc ], }, ], - 'volumes': [ - { + 'volumes': + [stepVolumeOC10Tests] + + [{ 'name': 'uploads', 'temp': {} - } - ], + }], 'depends_on': getPipelineNames([buildOcisBinaryForTesting(ctx)]), 'trigger': { 'ref': [ @@ -1039,7 +1043,7 @@ def changelog(ctx): }, { 'name': 'diff', - 'image': 'owncloud/alpine:latest', + 'image': 'owncloudci/alpine:latest', 'pull': 'always', 'commands': [ 'git diff', @@ -1047,7 +1051,7 @@ def changelog(ctx): }, { 'name': 'output', - 'image': 'owncloud/alpine:latest', + 'image': 'owncloudci/alpine:latest', 'pull': 'always', 'commands': [ 'cat CHANGELOG.md', @@ -1271,7 +1275,7 @@ def updateDeployment(ctx): 'steps': [ { 'name': 'webhook', - 'image': 'plugins/webhook', + 'image': 'plugins/webhook:1', 'settings': { 'username': { 'from_secret': 'webhook_username', @@ -1347,7 +1351,7 @@ def frontend(module): } ] -def ocisServer(storage, accounts_hash_difficulty = 4): +def ocisServer(storage, accounts_hash_difficulty = 4, volumes=[]): environment = { #'OCIS_LOG_LEVEL': 'debug', 'STORAGE_HOME_DRIVER': '%s' % (storage), @@ -1383,16 +1387,15 @@ def ocisServer(storage, accounts_hash_difficulty = 4): return [ { 'name': 'ocis-server', - 'image': 'webhippie/golang:1.14', + 'image': 'owncloudci/alpine:latest', 'pull': 'always', 'detach': True, 'environment' : environment, 'commands': [ 'apk add mailcap', # install /etc/mime.types - 'mkdir -p /srv/app/tmp/ocis/owncloud/data/', - 'mkdir -p /srv/app/tmp/ocis/storage/users/', 'ocis/bin/ocis server' ], + 'volumes': volumes, }, ]