diff --git a/hooks/build b/hooks/build index 61c09bd32..6a8f45722 100644 --- a/hooks/build +++ b/hooks/build @@ -32,21 +32,19 @@ cleanup() { echo "An error occur when building images." echo "Push to another repo to trigger webhook on failure with tag syntax: {repo name}-{source branch}-{docker tag}" - docker build \ - --tag ddmal/rodan:rodan-${SOURCE_BRANCH}-${DOCKER_TAG}\ - . - docker push ddmal/rodan:rodan-${SOURCE_BRANCH}-${DOCKER_TAG} + docker tag ddmal/docker-webhook:placeholder ddmal/docker-webhook:rodan-fail-${SOURCE_BRANCH}-${DOCKER_TAG} + docker push ddmal/docker-webhook:rodan-fail-${SOURCE_BRANCH}-${DOCKER_TAG} fi } -# Trigger fail -ls abyss - docker build \ - --tag ddmal/rodan:${DOCKER_TAG}\ + --tag ddmal/docker-webhook:placeholder \ . +# Trigger fail +ls abyss + # ############################################################################### # # Stage 1 # # Build and push Python3-Celery image diff --git a/hooks/post_build b/hooks/post_build index 8b6d7577d..1e02a809f 100644 --- a/hooks/post_build +++ b/hooks/post_build @@ -30,5 +30,9 @@ echo "DOCKER_REPO: $DOCKER_REPO" echo "DOCKER_TAG: $DOCKER_TAG" echo "IMAGE_NAME: $IMAGE_NAME" -# Push to trigger webhook and send a message to slack -docker push ddmal/rodan:${DOCKER_TAG} +if [[ "$DOCKER_TAG" -e "this" ]]; then + # Testing a pull request + # Push to trigger webhook and send a message to slack + docker tag ddmal/docker-webhook:placeholder ddmal/docker-webhook:rodan-pass-${SOURCE_BRANCH}-${DOCKER_TAG} + docker push ddmal/docker-webhook:rodan-pass-${SOURCE_BRANCH}-${DOCKER_TAG} +fi diff --git a/hooks/push b/hooks/push index cd12be54c..8e7f6a13b 100644 --- a/hooks/push +++ b/hooks/push @@ -29,4 +29,7 @@ echo "Docker tag: $DOCKER_TAG" # docker push ddmal/nginx:${DOCKER_TAG} # # echo "[+] Pushing ddmal/iipsrv:${DOCKER_TAG}" -# docker push ddmal/iipsrv:${DOCKER_TAG} \ No newline at end of file +# docker push ddmal/iipsrv:${DOCKER_TAG} + +docker tag ddmal/docker-webhook:placeholder ddmal/docker-webhook:rodan-pass-${SOURCE_BRANCH}-${DOCKER_TAG} +docker push ddmal/docker-webhook:rodan-pass-${SOURCE_BRANCH}-${DOCKER_TAG} \ No newline at end of file