use tag instead of promote to trigger build pipelines
All checks were successful
continuous-integration/drone/tag Build is passing
All checks were successful
continuous-integration/drone/tag Build is passing
This commit is contained in:
parent
e9a8b0ee3a
commit
e87f57ab1a
24
.drone.yml
24
.drone.yml
@ -15,8 +15,8 @@ steps:
|
||||
- name: docker-socket
|
||||
path: /var/run/docker.sock
|
||||
environment:
|
||||
DRONE_API_TOKEN:
|
||||
from_secret: drone_api_token
|
||||
GITEA_API_TOKEN:
|
||||
from_secret: gitea_api_token
|
||||
REGISTRY_PWD:
|
||||
from_secret: registry_pwd
|
||||
commands:
|
||||
@ -37,8 +37,8 @@ steps:
|
||||
- |
|
||||
if [[ $COMMIT_HASH != $IMAGE_COMMIT_HASH ]]; then
|
||||
echo -e '\033[1;33mUpdates available, triggering server build.\033[0m'
|
||||
curl -X POST -H "Authorization: Bearer $DRONE_API_TOKEN" \
|
||||
https://drone.jfmonty2.com/api/repos/jfmonty2/drone/builds/$DRONE_BUILD_NUMBER/promote?target=server-build
|
||||
curl -X POST -H "Authorization: token $GITEA_API_TOKEN" -H "Content-Type: application/json" \
|
||||
https://git.jfmonty2.com/api/v1/repos/jfmonty2/drone/tags -d "{\"tag_name\": \"server-$LATEST_VERSION\"}"
|
||||
else
|
||||
echo -e '\033[0;32mServer is already up to date.\033[0m'
|
||||
fi
|
||||
@ -53,8 +53,8 @@ steps:
|
||||
- |
|
||||
if [[ $LATEST_VERSION != $CURRENT_VERSION ]]; then
|
||||
echo -e '\033[1;33mNew release available, triggering runner build.\033[0m'
|
||||
curl -X POST -H "Authorization: Bearer $DRONE_API_TOKEN" \
|
||||
https://drone.jfmonty2.com/api/repos/jfmonty2/drone/builds/$DRONE_BUILD_NUMBER/promote?target=runner-build
|
||||
curl -X POST -H "Authorization: token $GITEA_API_TOKEN" -H "Content-Type: application/json" \
|
||||
https://git.jfmonty2.com/api/v1/repos/jfmonty2/drone/tags -d "{\"tag_name\": \"runner-exec-$LATEST_VERSION\"}"
|
||||
else
|
||||
echo -e '\033[0;32mRunner is already up to date.\033[0m'
|
||||
fi
|
||||
@ -72,9 +72,9 @@ name: server
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- server-build
|
||||
- tag
|
||||
ref:
|
||||
- refs/tags/server-*
|
||||
|
||||
steps:
|
||||
- name: prepare
|
||||
@ -149,9 +149,9 @@ name: runner-exec
|
||||
|
||||
trigger:
|
||||
event:
|
||||
- promote
|
||||
target:
|
||||
- runner-build
|
||||
- tag
|
||||
ref:
|
||||
- refs/tags/runner-exec-*
|
||||
|
||||
steps:
|
||||
- name: docker-build
|
||||
|
Loading…
x
Reference in New Issue
Block a user