Skip to content

Commit

Permalink
Backport drone fix from go-gitea#7480 and go-gitea#7496 (go-gitea#7504)
Browse files Browse the repository at this point in the history
* don't make release-version deps on transalations since translations is only triggered by push on master (go-gitea#7496)

* drone/docker: Use a more standard format (go-gitea#7480)

* 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

* use latest plugins/docker:linux-amd64

* remove useless cache_from

* Don't depends on translations step
  • Loading branch information
sapk authored and techknowlogick committed Jul 18, 2019
1 parent 91e24a3 commit d372539
Showing 1 changed file with 17 additions and 37 deletions.
54 changes: 17 additions & 37 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,6 @@ trigger:

depends_on:
- testing
- translations

steps:
- name: fetch-tags
Expand Down Expand Up @@ -569,6 +568,15 @@ workspace:
base: /go
path: src/code.gitea.io/gitea

depends_on:
- testing

trigger:
ref:
- refs/heads/master
- "refs/tags/**"
- "refs/pull/**"

steps:
- name: fetch-tags
pull: default
Expand All @@ -582,56 +590,28 @@ steps:

- name: dryrun
pull: always
image: plugins/docker:18.09
image: plugins/docker:linux-amd64
settings:
cache_from: gitea/gitea
dry_run: true
repo: gitea/gitea
when:
event:
- pull_request

- name: release
pull: always
image: plugins/docker:18.09
settings:
cache_from: gitea/gitea
repo: gitea/gitea
tags:
- "${DRONE_BRANCH##release/v}"
environment:
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
depends_on:
- dryrun
when:
branch:
- "release/*"
event:
- push

- name: latest
- name: publish
pull: always
image: plugins/docker:18.09
image: plugins/docker:linux-amd64
settings:
cache_from: gitea/gitea
default_tags: true
auto_tag: true
repo: gitea/gitea
environment:
DOCKER_PASSWORD:
password:
from_secret: docker_password
DOCKER_USERNAME:
username:
from_secret: docker_username
depends_on:
- dryrun
when:
branch:
- master
event:
- push
- tag
exclude:
- pull_request

---
kind: pipeline
Expand Down

0 comments on commit d372539

Please sign in to comment.