From 94ad1585f6213e12c22da1255a356d6e0fdb4082 Mon Sep 17 00:00:00 2001 From: Thomas Boerger Date: Tue, 3 Sep 2019 18:23:38 +0200 Subject: [PATCH] Fix typo and replace tabs within starlark script --- .drone.starlark | 137 +++++++++++++++++++++++++----------------------- .drone.yml | 22 ++++++-- .editorconfig | 8 +++ 3 files changed, 97 insertions(+), 70 deletions(-) diff --git a/.drone.starlark b/.drone.starlark index 89fc206e7..dfb956660 100644 --- a/.drone.starlark +++ b/.drone.starlark @@ -56,7 +56,7 @@ def testing(): 'volumes': [ { 'name': 'gopath', - 'path': '/arv/app' + 'path': '/srv/app' } ] }, @@ -70,7 +70,7 @@ def testing(): 'volumes': [ { 'name': 'gopath', - 'path': '/arv/app' + 'path': '/srv/app' } ] }, @@ -84,7 +84,7 @@ def testing(): 'volumes': [ { 'name': 'gopath', - 'path': '/arv/app' + 'path': '/srv/app' } ] }, @@ -98,7 +98,7 @@ def testing(): 'volumes': [ { 'name': 'gopath', - 'path': '/arv/app' + 'path': '/srv/app' } ] }, @@ -112,7 +112,7 @@ def testing(): 'volumes': [ { 'name': 'gopath', - 'path': '/arv/app' + 'path': '/srv/app' } ] }, @@ -121,9 +121,9 @@ def testing(): 'image': 'plugins/codacy:1', 'pull': 'always', 'settings': { - 'token': { - 'from_secret': 'codacy_token' - } + 'token': { + 'from_secret': 'codacy_token' + } } } ], @@ -185,16 +185,23 @@ def docker(arch): 'image': 'plugins/docker:18.09', 'pull': 'always', 'settings': { - 'username': { - 'from_secret': 'docker_username' - }, - 'password': { - 'from_secret': 'docker_password' - }, - 'auto_tag': True, - 'auto_tag_suffix': 'linux-%s' % arch, - 'dockerfile': 'docker/Dockerfile.linux.%s' % arch, - 'repo': 'owncloud/reva-phoenix', + 'username': { + 'from_secret': 'docker_username' + }, + 'password': { + 'from_secret': 'docker_password' + }, + 'auto_tag': True, + 'auto_tag_suffix': 'linux-%s' % arch, + 'dockerfile': 'docker/Dockerfile.linux.%s' % arch, + 'repo': 'owncloud/reva-phoenix', + }, + 'when': { + 'event': { + 'exclude': [ + 'pull_request' + ] + } } }, ], @@ -271,27 +278,27 @@ def binary(name): 'image': 'plugins/s3:1', 'pull': 'always', 'settings': { - 'endpoint': { - 'from_secret': 's3_endpoint' - }, - 'access_key': { - 'from_secret': 'aws_access_key_id' - }, - 'secret_key': { - 'from_secret': 'aws_secret_access_key' - }, - 'bucket': { - 'from_secret': 's3_bucket' - }, - 'path_style': True, - 'strip_prefix': 'dist/release/', - 'source': 'dist/release/*', - 'target': '/reva/phoenix/testing' + 'endpoint': { + 'from_secret': 's3_endpoint' + }, + 'access_key': { + 'from_secret': 'aws_access_key_id' + }, + 'secret_key': { + 'from_secret': 'aws_secret_access_key' + }, + 'bucket': { + 'from_secret': 's3_bucket' + }, + 'path_style': True, + 'strip_prefix': 'dist/release/', + 'source': 'dist/release/*', + 'target': '/reva/phoenix/testing' }, 'when': { - 'event': [ - 'push' - ] + 'event': [ + 'push' + ] } }, { @@ -299,27 +306,27 @@ def binary(name): 'image': 'plugins/s3:1', 'pull': 'always', 'settings': { - 'endpoint': { - 'from_secret': 's3_endpoint' - }, - 'access_key': { - 'from_secret': 'aws_access_key_id' - }, - 'secret_key': { - 'from_secret': 'aws_secret_access_key' - }, - 'bucket': { - 'from_secret': 's3_bucket' - }, - 'path_style': True, - 'strip_prefix': 'dist/release/', - 'source': 'dist/release/*', - 'target': '/reva/phoenix/${DRONE_TAG##v}' + 'endpoint': { + 'from_secret': 's3_endpoint' + }, + 'access_key': { + 'from_secret': 'aws_access_key_id' + }, + 'secret_key': { + 'from_secret': 'aws_secret_access_key' + }, + 'bucket': { + 'from_secret': 's3_bucket' + }, + 'path_style': True, + 'strip_prefix': 'dist/release/', + 'source': 'dist/release/*', + 'target': '/reva/phoenix/${DRONE_TAG##v}' }, 'when': { - 'event': [ - 'tag' - ] + 'event': [ + 'tag' + ] } }, { @@ -327,17 +334,17 @@ def binary(name): 'image': 'plugins/github-release:1', 'pull': 'always', 'settings': { - 'api_key': { - 'from_secret': 'github_token' - }, - 'files': [ - 'dist/release/*' - ] + 'api_key': { + 'from_secret': 'github_token' + }, + 'files': [ + 'dist/release/*' + ] }, 'when': { - 'event': [ - 'tag' - ] + 'event': [ + 'tag' + ] } } ], diff --git a/.drone.yml b/.drone.yml index cd0946c98..ba3c05b90 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,7 +24,7 @@ steps: - make vet volumes: - name: gopath - path: /arv/app + path: /srv/app - name: staticcheck pull: always @@ -33,7 +33,7 @@ steps: - make staticcheck volumes: - name: gopath - path: /arv/app + path: /srv/app - name: lint pull: always @@ -42,7 +42,7 @@ steps: - make lint volumes: - name: gopath - path: /arv/app + path: /srv/app - name: build pull: always @@ -51,7 +51,7 @@ steps: - make build volumes: - name: gopath - path: /arv/app + path: /srv/app - name: test pull: always @@ -60,7 +60,7 @@ steps: - make test volumes: - name: gopath - path: /arv/app + path: /srv/app - name: codacy pull: always @@ -119,6 +119,10 @@ steps: repo: owncloud/reva-phoenix username: from_secret: docker_username + when: + event: + exclude: + - pull_request volumes: - name: gopath @@ -173,6 +177,10 @@ steps: repo: owncloud/reva-phoenix username: from_secret: docker_username + when: + event: + exclude: + - pull_request volumes: - name: gopath @@ -227,6 +235,10 @@ steps: repo: owncloud/reva-phoenix username: from_secret: docker_username + when: + event: + exclude: + - pull_request volumes: - name: gopath diff --git a/.editorconfig b/.editorconfig index e49133a90..bc321db7b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -15,5 +15,13 @@ indent_size = 4 indent_style = tab indent_size = 4 +[*.starlark] +indent_style = space +indent_size = 2 + +[*.yml] +indent_style = space +indent_size = 2 + [*.md] trim_trailing_whitespace = true