Skip to content

Commit

Permalink
Merge pull request #418 from giantswarm/fix-tag-push
Browse files Browse the repository at this point in the history
Fix image push for tags
  • Loading branch information
AndiDog authored Jan 30, 2023
2 parents ceca356 + 9b87131 commit fc1a0d2
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,23 @@ jobs:
command: |
for registry in $REGISTRY_QUAY $REGISTRY_CHINA; do
make docker-build-all ALL_ARCH="$ALL_ARCH" TAG=$CIRCLE_SHA1 REGISTRY=$registry
if [ -n "$CIRCLE_TAG" ]; then
echo "Building tag $CIRCLE_TAG"
make docker-build-all ALL_ARCH="$ALL_ARCH" TAG="$CIRCLE_TAG" REGISTRY=$registry
fi
done
- run:
name: Push to quay
command: |
docker login --username $QUAY_USERNAME --password $QUAY_PASSWORD quay.io
make docker-push-all ALL_ARCH="$ALL_ARCH" TAG=$CIRCLE_SHA1 REGISTRY=$REGISTRY_QUAY
if [[ -n $CIRCLE_TAG ]]; then docker tag quay.io/giantswarm/cluster-api-aws-controller:$CIRCLE_SHA1 quay.io/giantswarm/cluster-api-aws-controller:$CIRCLE_TAG && docker push quay.io/giantswarm/cluster-api-aws-controller:$CIRCLE_TAG; fi
if [ -n "$CIRCLE_TAG" ]; then
echo "Pushing tag $CIRCLE_TAG"
make docker-push-all ALL_ARCH="$ALL_ARCH" TAG="$CIRCLE_TAG" REGISTRY=$REGISTRY_QUAY
fi
# Waiting for https://gigantic.slack.com/archives/C3C7ZQXC1/p1674714600715149
# ---
Expand All @@ -33,7 +42,11 @@ jobs:
# docker login --username $ALIYUN_USERNAME --password $ALIYUN_PASSWORD registry-intl.cn-shanghai.aliyuncs.com

# make docker-push-all ALL_ARCH="$ALL_ARCH" TAG=$CIRCLE_SHA1 REGISTRY=$REGISTRY_CHINA
# if [[ -n $CIRCLE_TAG ]]; then docker tag registry-intl.cn-shanghai.aliyuncs.com/giantswarm/cluster-api-aws-controller:$CIRCLE_SHA1 registry-intl.cn-shanghai.aliyuncs.com/giantswarm/cluster-api-aws-controller:$CIRCLE_TAG && docker push registry-intl.cn-shanghai.aliyuncs.com/giantswarm/cluster-api-aws-controller:$CIRCLE_TAG; fi

# if [ -n "$CIRCLE_TAG" ]; then
# echo "Pushing tag $CIRCLE_TAG"
# make docker-push-all ALL_ARCH="$ALL_ARCH" TAG="$CIRCLE_TAG" REGISTRY=$REGISTRY_CHINA
# fi

workflows:
version: 2
Expand Down

0 comments on commit fc1a0d2

Please sign in to comment.