ci: Distribute env var to avoid bugs
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ddcac30b89
commit
f95b7ff10e
1 changed files with 12 additions and 13 deletions
25
.drone.yml
25
.drone.yml
|
@ -3,16 +3,13 @@ kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
environment:
|
|
||||||
DOCKER_REPO: &docker_repo glenux/service-dolibarr
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: debug
|
- name: debug
|
||||||
image: alpine
|
image: alpine
|
||||||
environment:
|
environment:
|
||||||
|
|
||||||
commands:
|
commands:
|
||||||
- 'echo "Repository: $${DOCKER_REPO}"'
|
- 'echo "Repository: glenux/service-dolibarr"'
|
||||||
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'
|
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'
|
||||||
|
|
||||||
- name: publish:commit_sha
|
- name: publish:commit_sha
|
||||||
|
@ -28,8 +25,8 @@ steps:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKERHUB_PASSWORD
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
cache_from: "$${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}"
|
cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}"
|
||||||
repo: *docker_repo
|
repo: glenux/service-dolibarr
|
||||||
tags: "${DRONE_COMMIT_SHA:0:8}"
|
tags: "${DRONE_COMMIT_SHA:0:8}"
|
||||||
purge: false
|
purge: false
|
||||||
|
|
||||||
|
@ -43,8 +40,8 @@ steps:
|
||||||
from_secret: DOCKERHUB_USERNAME
|
from_secret: DOCKERHUB_USERNAME
|
||||||
password:
|
password:
|
||||||
from_secret: DOCKERHUB_PASSWORD
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
cache_from: "$${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}"
|
cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}"
|
||||||
repo: *docker_repo
|
repo: glenux/service-dolibarr
|
||||||
tags: "latest_${DRONE_BRANCH/\\//-}"
|
tags: "latest_${DRONE_BRANCH/\\//-}"
|
||||||
purge: false
|
purge: false
|
||||||
when:
|
when:
|
||||||
|
@ -53,13 +50,15 @@ steps:
|
||||||
- "develop"
|
- "develop"
|
||||||
- "feature/*"
|
- "feature/*"
|
||||||
|
|
||||||
- name: docker
|
- name: publish:latest
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
username: "${DOCKERHUB_USERNAME}"
|
username:
|
||||||
password: "${DOCKERHUB_PASSWORD}"
|
from_secret: DOCKERHUB_USERNAME
|
||||||
cache_from: "$${DOCKER_REPO}:latest_${DRONE_BRANCH/\\//-}"
|
password:
|
||||||
repo: *docker_repo
|
from_secret: DOCKERHUB_PASSWORD
|
||||||
|
cache_from: "glenux/service-dolibarr:latest_${DRONE_BRANCH/\\//-}"
|
||||||
|
repo: glenux/service-dolibarr
|
||||||
tags: latest
|
tags: latest
|
||||||
purge: false
|
purge: false
|
||||||
when:
|
when:
|
||||||
|
|
Loading…
Reference in a new issue