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