Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Don't Always Push to DockerHub #10485

Merged
merged 2 commits into from
Jul 9, 2021
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion .cicd/create-docker-from-binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ echo "$ $DOCKER_BUILD"
eval $DOCKER_BUILD
# docker tag
echo '--- :label: Tag Container'
REGISTRIES=("$EOSIO_REGISTRY" "$DOCKERHUB_REGISTRY")
if [[ "$BUILDKITE_PIPELINE_SLUG" =~ "-sec" ]] ; then
REGISTRIES=("$EOSIO_REGISTRY")
else
REGISTRIES=("$EOSIO_REGISTRY" "$DOCKERHUB_REGISTRY")
fi
for REG in ${REGISTRIES[@]}; do
DOCKER_TAG_BRANCH="docker tag '$IMAGE' '$REG:$SANITIZED_BRANCH'"
echo "$ $DOCKER_TAG_BRANCH"
Expand Down
9 changes: 7 additions & 2 deletions .cicd/helpers/general.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ export MOUNTED_DIR='/eos'
export DOCKER_CLI_EXPERIMENTAL='enabled'
export DOCKERHUB_CI_REGISTRY="docker.io/eosio/ci"
export DOCKERHUB_CONTRACTS_REGISTRY="docker.io/eosio/ci-contracts-builder"
export CI_REGISTRIES=("$DOCKERHUB_CI_REGISTRY" "$MIRROR_REGISTRY")
export CONTRACT_REGISTRIES=("$DOCKERHUB_CONTRACTS_REGISTRY" "$MIRROR_REGISTRY")
if [[ "$BUILDKITE_PIPELINE_SLUG" =~ "-sec" ]] ; then
export CI_REGISTRIES=("$MIRROR_REGISTRY")
export CONTRACT_REGISTRIES=("$MIRROR_REGISTRY")
else
export CI_REGISTRIES=("$DOCKERHUB_CI_REGISTRY" "$MIRROR_REGISTRY")
export CONTRACT_REGISTRIES=("$DOCKERHUB_CONTRACTS_REGISTRY" "$MIRROR_REGISTRY")
fi

# capitalize each word in a string
function capitalize()
Expand Down