mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
Add a trigger to build on dockerhub
This commit is contained in:
parent
48ccab42e6
commit
3a5126d6fd
@ -1,4 +1,28 @@
|
|||||||
version: 2
|
version: 2
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
main-pipeline:
|
||||||
|
jobs:
|
||||||
|
- build-n-test:
|
||||||
|
filters:
|
||||||
|
tags:
|
||||||
|
only: /^[0-9.]+/
|
||||||
|
- deploy:
|
||||||
|
requires:
|
||||||
|
- build-n-test
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: /^(master|4|3)$/
|
||||||
|
tags:
|
||||||
|
only: /^[0-9.]+/
|
||||||
|
- trigger-dockerhub:
|
||||||
|
requires:
|
||||||
|
- build-n-test
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-n-test:
|
build-n-test:
|
||||||
machine: true
|
machine: true
|
||||||
@ -43,19 +67,10 @@ jobs:
|
|||||||
if [ ${CIRCLE_BRANCH} = master ]; then DOCKER_TAG=latest; else DOCKER_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}}; fi
|
if [ ${CIRCLE_BRANCH} = master ]; then DOCKER_TAG=latest; else DOCKER_TAG=${CIRCLE_TAG:-${CIRCLE_BRANCH}}; fi
|
||||||
docker tag adferrand/backuppc adferrand/backuppc:${DOCKER_TAG}
|
docker tag adferrand/backuppc adferrand/backuppc:${DOCKER_TAG}
|
||||||
docker push adferrand/backuppc:${DOCKER_TAG}
|
docker push adferrand/backuppc:${DOCKER_TAG}
|
||||||
workflows:
|
trigger-dockerhub:
|
||||||
version: 2
|
machine: true
|
||||||
main-pipeline:
|
steps:
|
||||||
jobs:
|
|
||||||
- build-n-test:
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /^[0-9.]+/
|
|
||||||
- deploy:
|
- deploy:
|
||||||
requires:
|
name: Trigger DockerHub build
|
||||||
- build-n-test
|
command: |
|
||||||
filters:
|
curl -H "Content-Type: application/json" --data '{"docker_tag": "master"}' -X POST https://registry.hub.docker.com/u/adferrand/backuppc/trigger/463a9d6d-4293-42bb-861f-72e450a22656/
|
||||||
branches:
|
|
||||||
only: /^(master|4|3)$/
|
|
||||||
tags:
|
|
||||||
only: /^[0-9.]+/
|
|
||||||
|
Loading…
Reference in New Issue
Block a user