-
Notifications
You must be signed in to change notification settings - Fork 541
Gokula/fix bot build tag #2676
Gokula/fix bot build tag #2676
Conversation
dev to beta
beta to master
dev to beta
dev to beta
dev to beta
dev to beta
beta to master
dev to beta
beta to master
dev to beta
beta to master
dev to beta
dev to beta
dev to beta
beta to master
dev to beta
beta to master
dev to beta
beta to master
dev to beta
beta to master
.circleci/config.yml
Outdated
| docker build -t ${DOCKHUB_ORGANISATION}/binary-static-bot:${build_tag} -t ${DOCKHUB_ORGANISATION}/binary-static-bot:latest . | ||
| build_latest="latest" | ||
| [ "<< parameters.target >>" == "beta" ] && build_tag="beta-${CIRCLE_SHA1}" && build_latest="beta-latest" | ||
| docker build -t ${DOCKHUB_ORGANISATION}/binary-static-bot:${build_tag} -t ${DOCKHUB_ORGANISATION}/binary-static-bot:build_latest . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It must change to this:
docker build -t ${DOCKHUB_ORGANISATION}/binary-static-bot:${build_tag} -t ${DOCKHUB_ORGANISATION}/binary-static-bot:${build_latest} .
.circleci/config.yml
Outdated
| echo $DOCKERHUB_PASSWORD | docker login -u $DOCKERHUB_USERNAME --password-stdin | ||
| docker push ${DOCKHUB_ORGANISATION}/binary-static-bot:${build_tag} | ||
| docker push ${DOCKHUB_ORGANISATION}/binary-static-bot:latest | ||
| docker push ${DOCKHUB_ORGANISATION}/binary-static-bot:build_latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to remove tag in docker push command or change build_latest as a variable
docker push ${DOCKHUB_ORGANISATION}/binary-static-bot
or
docker push ${DOCKHUB_ORGANISATION}/binary-static-bot:${build_latest}
.circleci/config.yml
Outdated
| build_tag="${CIRCLE_SHA1}" | ||
| [ "<< parameters.target >>" == "beta" ] && build_tag="beta-${CIRCLE_SHA1}" | ||
| docker build -t ${DOCKHUB_ORGANISATION}/binary-static-bot:${build_tag} -t ${DOCKHUB_ORGANISATION}/binary-static-bot:latest . | ||
| build_latest="latest" | ||
| [ "<< parameters.target >>" == "beta" ] && build_tag="beta-${CIRCLE_SHA1}" && build_latest="beta-latest" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also build_latest should be a parameter that would either have a value "beta-latest" or "latest" from workflow. build_tag value can be either CIRCLE_SHA1 or CIRCLE_TAG which should be set from workflow
.circleci/config.yml
Outdated
| build_tag="${CIRCLE_SHA1}" | ||
| deployment_target="bot-binary-com" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again if you declare build_tag and deployment_target as a parameter and set the value from workflow based on staging and production things would be much easier.
Fixes #1, Fixes #2