add notification
This commit is contained in:
parent
d88041bfbf
commit
7881c91180
@ -1,3 +1,15 @@
|
||||
variables:
|
||||
&vars
|
||||
- REGISTRY=code.balsillie.net
|
||||
- REGISTRY_USER=michael
|
||||
- ORGANIZATION=containers
|
||||
- SOURCE_ORGANIZATION=mirrors
|
||||
- REPO=matrix-service-synapse
|
||||
- BUILD_ARGS=PYTHON_VERSION=3.10
|
||||
- DOCKERFILE=docker/Dockerfile
|
||||
- CONTEXT=.
|
||||
- WATCHTOWER_HOST=watchtower.balsillie.net
|
||||
|
||||
workspace:
|
||||
base: /git
|
||||
path: pipeline
|
||||
@ -10,20 +22,20 @@ pipeline:
|
||||
|
||||
check-tag:
|
||||
image: debian:11-slim
|
||||
pull: false
|
||||
pull: true
|
||||
commands:
|
||||
- /bin/bash check-tag.sh
|
||||
|
||||
clone-source:
|
||||
image: docker:git
|
||||
environment:
|
||||
- REGISTRY=code.balsillie.net
|
||||
- SOURCE_ORGANIZATION=mirrors
|
||||
- REPO=matrix-service-synapse
|
||||
*vars
|
||||
commands:
|
||||
- git clone https://$REGISTRY/$SOURCE_ORGANIZATION/$REPO.git /git/$REPO
|
||||
- cd /git/$REPO
|
||||
- git checkout $TAG
|
||||
- git clone "https://$${REGISTRY}/$${SOURCE_ORGANIZATION}/$${REPO}.git" /git/$${REPO}
|
||||
- cd /git/$${REPO}
|
||||
- pwd
|
||||
- git checkout ${TAG}
|
||||
- ls
|
||||
|
||||
docker-build:
|
||||
image: docker:latest
|
||||
@ -43,13 +55,26 @@ pipeline:
|
||||
commands:
|
||||
- export DOCKER_BUILDKIT=1
|
||||
- cd /git/$${REPO}
|
||||
- pwd
|
||||
- ls
|
||||
- echo $REGISTRY_PASSWORD | docker login $REGISTRY -u $REGISTRY_USER --password-stdin
|
||||
- docker build
|
||||
-t $REGISTRY/$ORGANIZATION/$REPO:$TAG
|
||||
-t $REGISTRY/$ORGANIZATION/$REPO:${TAG}
|
||||
-t $REGISTRY/$ORGANIZATION/$REPO:$(date +%F)
|
||||
-t $REGISTRY/$ORGANIZATION/$REPO:latest
|
||||
--pull
|
||||
--build-arg $${BUILD_ARGS}
|
||||
-f $${DOCKERFILE}
|
||||
$${CONTEXT}
|
||||
- docker push -a $REGISTRY/$ORGANIZATION/$REPO
|
||||
- docker push -a $REGISTRY/$ORGANIZATION/$REPO
|
||||
|
||||
notify-watchtower:
|
||||
image: debian:11-slim
|
||||
pull: false
|
||||
environment:
|
||||
*vars
|
||||
secrets:
|
||||
- source: WATCHTOWER_HTTP_API_TOKEN
|
||||
target: WATCHTOWER_HTTP_API_TOKEN
|
||||
commands:
|
||||
- /bin/bash notify-watchtower.sh
|
2
.woodpecker/notify-watchtower.sh
Normal file
2
.woodpecker/notify-watchtower.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
curl -H "Authorization: Bearer ${WATCHTOWER_HTTP_API_TOKEN}" -i "https://${WATCHTOWER_HOST}/v1/update"
|
Loading…
Reference in New Issue
Block a user