forked from kubernetes-sigs/cluster-api-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use newer CircleCI config from
release-2.4
branch (#603)
- Loading branch information
Showing
1 changed file
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,29 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
go: circleci/[email protected] | ||
|
||
jobs: | ||
test: | ||
resource_class: large | ||
executor: | ||
name: go/default | ||
tag: "1.22.3" | ||
steps: | ||
- checkout | ||
- go/load-cache | ||
- go/mod-download | ||
- run: | ||
command: make setup-envtest | ||
- go/save-cache | ||
- run: | ||
command: make test | ||
|
||
build: | ||
machine: | ||
image: "ubuntu-2204:2022.10.2" | ||
image: "ubuntu-2204:2024.05.1" | ||
environment: | ||
ALL_ARCH: "amd64 arm64" | ||
REGISTRY_AZURE: gsoci.azurecr.io/giantswarm | ||
REGISTRY_QUAY: quay.io/giantswarm | ||
REGISTRY_CHINA: giantswarm-registry.cn-shanghai.cr.aliyuncs.com/giantswarm | ||
steps: | ||
|
@@ -15,7 +32,7 @@ jobs: | |
- run: | ||
name: Build the CAPA docker images | ||
command: | | ||
for registry in $REGISTRY_QUAY $REGISTRY_CHINA; do | ||
for registry in $REGISTRY_AZURE $REGISTRY_QUAY $REGISTRY_CHINA; do | ||
make docker-build-all ALL_ARCH="$ALL_ARCH" TAG=$CIRCLE_SHA1 REGISTRY=$registry | ||
if [ -n "$CIRCLE_TAG" ]; then | ||
|
@@ -24,6 +41,18 @@ jobs: | |
fi | ||
done | ||
- run: | ||
name: Push to Azure | ||
command: | | ||
docker login --username $ACR_GSOCI_USERNAME --password $ACR_GSOCI_PASSWORD "${REGISTRY_AZURE%/*}" | ||
make docker-push-all ALL_ARCH="$ALL_ARCH" TAG=$CIRCLE_SHA1 REGISTRY=$REGISTRY_AZURE | ||
if [ -n "$CIRCLE_TAG" ]; then | ||
echo "Pushing tag $CIRCLE_TAG" | ||
make docker-push-all ALL_ARCH="$ALL_ARCH" TAG="$CIRCLE_TAG" REGISTRY=$REGISTRY_AZURE | ||
fi | ||
- run: | ||
name: Push to quay | ||
command: | | ||
|
@@ -68,3 +97,4 @@ workflows: | |
filters: | ||
tags: | ||
only: /^v.*/ | ||
- test |