rename main pipeline
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
Joseph Montanaro 2021-01-02 17:53:38 -08:00
parent e2d00dafab
commit a01c098075

View File

@ -20,7 +20,8 @@ steps:
REGISTRY_PWD: REGISTRY_PWD:
from_secret: registry_pwd from_secret: registry_pwd
commands: commands:
- apk add git curl - apk add git curl jq
- echo "Checking for new server version"
# collect info from upstream repository # collect info from upstream repository
- git clone https://github.com/drone/drone.git - git clone https://github.com/drone/drone.git
- cd drone - cd drone
@ -34,7 +35,7 @@ steps:
# compare and trigger CI if necessary # compare and trigger CI if necessary
- | - |
if [[ $COMMIT_HASH != $IMAGE_COMMIT_HASH ]]; then if [[ $COMMIT_HASH != $IMAGE_COMMIT_HASH ]]; then
echo 'Updates available, triggering build pipeline.' echo 'Updates available, triggering server build.'
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
@ -50,7 +51,7 @@ volumes:
--- ---
kind: pipeline kind: pipeline
type: docker type: docker
name: main name: server
trigger: trigger:
event: event: