From 04df06c5d190fe755e2500e897388f8977f839ba Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Tue, 16 Jul 2019 02:06:45 +0200 Subject: [PATCH 1/4] drone/docker: Use a more standard format Based on the plugin drone structure itself : https://github.com/drone-plugins/drone-docker/blob/ebce953fc443371d79b5a019fcc9c1976f60a09a/.drone.yml#L9 Use autotag : http://plugins.drone.io/drone-plugins/drone-docker/#autotag --- .drone.yml | 50 +++++++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/.drone.yml b/.drone.yml index c07179b95dfe9..c718d75ea1346 100644 --- a/.drone.yml +++ b/.drone.yml @@ -571,6 +571,16 @@ workspace: base: /go path: src/code.gitea.io/gitea +depends_on: + - testing + - translations + +trigger: + ref: + - refs/heads/master + - "refs/tags/**" + - "refs/pull/**" + steps: - name: fetch-tags pull: default @@ -584,7 +594,7 @@ steps: - name: dryrun pull: always - image: plugins/docker:18.09 + image: plugins/docker:linux-amd64 settings: cache_from: gitea/gitea dry_run: true @@ -593,47 +603,21 @@ steps: event: - pull_request - - name: release + - name: publish pull: always image: plugins/docker:18.09 settings: cache_from: gitea/gitea + auto_tag: true repo: gitea/gitea - tags: - - "${DRONE_BRANCH##release/v}" - environment: - DOCKER_PASSWORD: + password: from_secret: docker_password - DOCKER_USERNAME: + username: from_secret: docker_username - depends_on: - - dryrun when: - branch: - - "release/*" event: - - push - - - name: latest - pull: always - image: plugins/docker:18.09 - settings: - cache_from: gitea/gitea - default_tags: true - repo: gitea/gitea - environment: - DOCKER_PASSWORD: - from_secret: docker_password - DOCKER_USERNAME: - from_secret: docker_username - depends_on: - - dryrun - when: - branch: - - master - event: - - push - - tag + exclude: + - pull_request --- kind: pipeline From 27983d54bee9e3787bdf6c0915c4d05c5910a119 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Tue, 16 Jul 2019 02:25:09 +0200 Subject: [PATCH 2/4] use latest plugins/docker:linux-amd64 --- .drone.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index c718d75ea1346..a57bae770aa3a 100644 --- a/.drone.yml +++ b/.drone.yml @@ -605,7 +605,7 @@ steps: - name: publish pull: always - image: plugins/docker:18.09 + image: plugins/docker:linux-amd64 settings: cache_from: gitea/gitea auto_tag: true From c1edd451b9ead61fc6c98aa6cd8686b991df8d08 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Tue, 16 Jul 2019 02:39:55 +0200 Subject: [PATCH 3/4] remove useless cache_from --- .drone.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index a57bae770aa3a..07ed3b1821ac3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -596,7 +596,6 @@ steps: pull: always image: plugins/docker:linux-amd64 settings: - cache_from: gitea/gitea dry_run: true repo: gitea/gitea when: @@ -607,7 +606,6 @@ steps: pull: always image: plugins/docker:linux-amd64 settings: - cache_from: gitea/gitea auto_tag: true repo: gitea/gitea password: From 885598469c6c101bb7dee3347ad0f4fa3de5e6b1 Mon Sep 17 00:00:00 2001 From: Antoine GIRARD Date: Wed, 17 Jul 2019 03:38:31 +0200 Subject: [PATCH 4/4] Don't depends on translations step --- .drone.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 07ed3b1821ac3..9a506dfd812a7 100644 --- a/.drone.yml +++ b/.drone.yml @@ -573,7 +573,6 @@ workspace: depends_on: - testing - - translations trigger: ref: