Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

last message #255

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions bin/herokutor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ set -eo pipefail
exit_message() {
echo ${1:-'exiting...'}
code=${2:-1}
if [[ "#{code}" == "0" ]]; then
if [[ "${code}" == "0" ]]; then
echo "[✓] ${APP}:${BRANCH}.${COMMIT_COUNT}" >> ${OUT_LOG}
echo "Build was OK, but it's not the correct branch(${APP}:${BRANCH}.${COMMIT_COUNT} By ${CHANGE_AUTHOR}). ignore this." >> ${OUT_LOG}
echo "green" >> ${OUT_LOG_COLOR}
else
echo "[] ${APP}:${BRANCH}.${COMMIT_COUNT}" >> ${OUT_LOG}
echo "[] ${APP}:${BRANCH}.${COMMIT_COUNT}" >> ${OUT_LOG}
echo "Build was NOT OK (${APP}:${BRANCH}.${COMMIT_COUNT} By ${CHANGE_AUTHOR}). Verify with dev team." >> ${OUT_LOG}
echo "red" > ${OUT_LOG_COLOR}
fi
Expand Down Expand Up @@ -58,7 +58,7 @@ export LONGHASH=$(git log -n1 --pretty="format:%H" | cat)
export SHORTHASH=$(git log -n1 --pretty="format:%h"| cat)
export COMMITDATE=$(git log -n1 --date="format:%D-%H-%I-%S" --pretty="format:%cd"| sed -e "s/\//-/g")
export IMPDATE=$(date +%Y%m%d)
export COMMITCOUNT=$(git rev-list HEAD --count| cat)
export COMMIT_COUNT=$(git rev-list HEAD --count| cat)
export BUILDDATE=$(date "+%D/%H/%I/%S"| sed -e "s/\//-/g")
popd

Expand Down Expand Up @@ -118,3 +118,7 @@ done
elif [[ "${BRANCH}" == "dev" ]]; then
kubectl -n ${APP} set image deployment ${APP}-webserver-${BRANCH} ${APP}-${BRANCH}=registry.clickyab.ae/clickyab/${APP}:${BRANCH}.${COMMITCOUNT} --record
fi

echo "..." >> ${OUT_LOG}
echo "Deploy done successfully to image registry.clickyab.ae/clickyab/${APP}:${BRANCH}.${COMMIT_COUNT}" >> ${OUT_LOG}
echo "green" >> ${OUT_LOG_COLOR}