-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trigger webhook and send message to slack
- By pushing a dummy image to another ddmal's docker repo
- Loading branch information
1 parent
b180695
commit 63199f8
Showing
3 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
# hooks/post_build | ||
|
||
source ./hooks/helper.sh | ||
if [[ ret_code -eq 1 ]]; then | ||
echo "[-] no branch detected, fallback to use docker tag=$DOCKER_TAG" | ||
echo "[-] Stop building due to wrong tag: $DOCKER_TAG" | ||
exit 1 | ||
elif [[ ret_code -eq 2 ]]; then | ||
echo "[-] no tag on release branch, fallback to use docker tag=$DOCKER_TAG" | ||
echo "[-] Stop building due to wrong tag: $DOCKER_TAG" | ||
exit 1 | ||
fi | ||
|
||
# Pass testing a pull request | ||
# Push to trigger webhook and send a message to slack | ||
if [[ "$DOCKER_TAG" == "this" ]]; then | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters