use tag instead of promote to trigger build pipelines
This commit is contained in:
parent
e9a8b0ee3a
commit
392d87395c
20
.drone.yml
20
.drone.yml
@ -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