service-semaphore/.drone.yml

85 lines
1.8 KiB
YAML
Raw Normal View History

2023-01-24 12:57:17 +00:00
---
kind: pipeline
type: docker
name: default
steps:
- name: debug
image: alpine
environment:
commands:
2023-01-24 13:07:37 +00:00
- 'echo "Repository: glenux/service-semaphore"'
2023-01-24 12:57:17 +00:00
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'
- name: publish:commit_sha
image: plugins/docker
# pull: never
# volumes:
# - name: cache
# path: /stupid
environment:
2023-01-24 13:07:37 +00:00
DOCKER_REPO: glenux/service-semaphore
2023-01-24 12:57:17 +00:00
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
2023-01-24 13:07:37 +00:00
cache_from: "glenux/service-semaphore:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-semaphore
2023-01-24 12:57:17 +00:00
tags: "${DRONE_COMMIT_SHA:0:8}"
purge: false
- name: publish:commit_branch
image: plugins/docker
# volumes:
# - name: cache
# path: /stupid
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
2023-01-24 13:07:37 +00:00
cache_from: "glenux/service-semaphore:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-semaphore
2023-01-24 12:57:17 +00:00
tags: "latest_${DRONE_BRANCH/\\//-}"
purge: false
when:
branch:
- "master"
- "develop"
- "feature/*"
- name: publish:latest
image: plugins/docker
settings:
username:
from_secret: DOCKERHUB_USERNAME
password:
from_secret: DOCKERHUB_PASSWORD
2023-01-24 13:07:37 +00:00
cache_from: "glenux/service-semaphore:latest_${DRONE_BRANCH/\\//-}"
repo: glenux/service-semaphore
2023-01-24 12:57:17 +00:00
tags: latest
purge: false
when:
branch:
- master
# volumes:
# - name: cache
# temp: {}
#
---
kind: pipeline
type: docker
2023-01-24 13:02:44 +00:00
name: cronjob
2023-01-24 12:57:17 +00:00
steps:
- name: check:update
image: alpine
environment:
commands:
2023-01-24 13:07:37 +00:00
- 'echo "Repository: glenux/service-semaphore"'
2023-01-24 12:57:17 +00:00
- 'echo "Git commit: ${DRONE_COMMIT_SHA:0:8}"'