This commit is contained in:
parent
712ddb76ca
commit
1c2a64a1e1
@ -36,11 +36,11 @@ steps:
|
|||||||
# compare and trigger build if necessary
|
# compare and trigger build if necessary
|
||||||
- |
|
- |
|
||||||
if [[ $COMMIT_HASH != $IMAGE_COMMIT_HASH ]]; then
|
if [[ $COMMIT_HASH != $IMAGE_COMMIT_HASH ]]; then
|
||||||
echo 'Updates available, triggering server build.'
|
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: Bearer $DRONE_API_TOKEN" \
|
||||||
https://drone.jfmonty2.com/api/repos/jfmonty2/drone/builds/$DRONE_BUILD_NUMBER/promote?target=server-build
|
https://drone.jfmonty2.com/api/repos/jfmonty2/drone/builds/$DRONE_BUILD_NUMBER/promote?target=server-build
|
||||||
else
|
else
|
||||||
echo 'Server is already up to date.'
|
echo -e '\033[0;32mServer is already up to date.\033[0m'
|
||||||
fi
|
fi
|
||||||
# now check for runner
|
# now check for runner
|
||||||
- echo "Checking for new runner version"
|
- echo "Checking for new runner version"
|
||||||
@ -52,11 +52,11 @@ steps:
|
|||||||
# compare and trigger build if necessary
|
# compare and trigger build if necessary
|
||||||
- |
|
- |
|
||||||
if [[ $LATEST_VERSION != $CURRENT_VERSION ]]; then
|
if [[ $LATEST_VERSION != $CURRENT_VERSION ]]; then
|
||||||
echo 'New release available, triggering runner build.'
|
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: Bearer $DRONE_API_TOKEN" \
|
||||||
https://drone.jfmonty2.com/api/repos/jfmonty2/drone/builds/$DRONE_BUILD_NUMBER/promote?target=runner-build
|
https://drone.jfmonty2.com/api/repos/jfmonty2/drone/builds/$DRONE_BUILD_NUMBER/promote?target=runner-build
|
||||||
else
|
else
|
||||||
echo 'Runner is already up to date.'
|
echo -e '\033[0;32mRunner is already up to date.\033[0m'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user