Skip to content
This repository was archived by the owner on Feb 22, 2024. It is now read-only.

Conversation

@gokula-krishna-dev
Copy link
Contributor

Q                       A
Fixed Issues? Fixes #1, Fixes #2
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Does not reduce coverage? Yes
Any Dependency Changes?

Aaron and others added 24 commits February 10, 2020 15:45
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 .
Copy link
Contributor

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} .

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
Copy link
Contributor

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}

Comment on lines 97 to 99
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"
Copy link
Contributor

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

Comment on lines 129 to 130
build_tag="${CIRCLE_SHA1}"
deployment_target="bot-binary-com"
Copy link
Contributor

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.

@4p00rv 4p00rv merged commit 4d9fbe0 into binary-com:dev Apr 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants