Skip to content

Commit

Permalink
build-gce-ubuntu-1804 is deprecated update to build-gce-ubuntu-2004
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <[email protected]>
  • Loading branch information
cpanato committed Jun 29, 2023
1 parent 94ef211 commit 2458f33
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/book/src/developers/cluster-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ For creating a cluster with clusterctl, checkout our [Cluster API Quick Start](h
export GCP_NETWORK_NAME=default
export GCP_B64ENCODED_CREDENTIALS=$( cat /path/to/gcp_credentials.json | base64 | tr -d '\n' )
export CLUSTER_NAME="capg-test"
export IMAGE_ID=projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-1804-v1-20-9-nightly
export IMAGE_ID=projects/k8s-staging-cluster-api-gcp/global/images/cluster-api-ubuntu-2004-v1-20-9-nightly
```

You can check for other images to set the `IMAGE_ID` of your choice.
Expand Down
4 changes: 2 additions & 2 deletions docs/book/src/topics/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ git clone https://github.com/kubernetes-sigs/image-builder.git image-builder
cd image-builder/images/capi

# Run the Make target to generate GCE images.
make build-gce-ubuntu-1804
make build-gce-ubuntu-2004

# Check that you can see the published images.
gcloud compute images list --project ${GCP_PROJECT_ID} --no-standard-images --filter="family:capi-ubuntu-1804-k8s"
gcloud compute images list --project ${GCP_PROJECT_ID} --no-standard-images --filter="family:capi-ubuntu-2004-k8s"

# Export the IMAGE_ID from the above
export IMAGE_ID="projects/${GCP_PROJECT_ID}/global/images/<image-name>"
Expand Down
6 changes: 3 additions & 3 deletions scripts/ci-conformance.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,17 +88,17 @@ EOF
GCP_PROJECT_ID=$GCP_PROJECT \
GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS \
PACKER_VAR_FILES=override.json \
make deps-gce build-gce-ubuntu-1804)
make deps-gce build-gce-ubuntu-2004)
else
# assume we are running in the CI environment as root
# Add a user for ansible to work properly
groupadd -r packer && useradd -m -s /bin/bash -r -g packer packer
chown -R packer:packer /home/prow/go/src/sigs.k8s.io/image-builder
# use the packer user to run the build
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=override.json make deps-gce build-gce-ubuntu-1804'"
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=override.json make deps-gce build-gce-ubuntu-2004'"
fi

filter="name~cluster-api-ubuntu-1804-${KUBERNETES_VERSION//[.+]/-}"
filter="name~cluster-api-ubuntu-2004-${KUBERNETES_VERSION//[.+]/-}"
image_id=$(gcloud compute images list --project "$GCP_PROJECT" \
--no-standard-images --filter="${filter}" --format="table[no-heading](name)")
if [[ -z "$image_id" ]]; then
Expand Down
6 changes: 3 additions & 3 deletions scripts/ci-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,17 @@ EOF
GCP_PROJECT_ID=$GCP_PROJECT \
GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS \
PACKER_VAR_FILES=override.json \
make deps-gce build-gce-ubuntu-1804)
make deps-gce build-gce-ubuntu-2004)
else
# assume we are running in the CI environment as root
# Add a user for ansible to work properly
groupadd -r packer && useradd -m -s /bin/bash -r -g packer packer
chown -R packer:packer /home/prow/go/src/sigs.k8s.io/image-builder
# use the packer user to run the build
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=override.json make deps-gce build-gce-ubuntu-1804'"
su - packer -c "bash -c 'cd /home/prow/go/src/sigs.k8s.io/image-builder/images/capi && PATH=$PATH:~packer/.local/bin:/home/prow/go/src/sigs.k8s.io/image-builder/images/capi/.local/bin GCP_PROJECT_ID=$GCP_PROJECT GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS PACKER_VAR_FILES=override.json make deps-gce build-gce-ubuntu-2004'"
fi

filter="name~cluster-api-ubuntu-1804-${KUBERNETES_VERSION//[.+]/-}"
filter="name~cluster-api-ubuntu-2004-${KUBERNETES_VERSION//[.+]/-}"
image_id=$(gcloud compute images list --project "$GCP_PROJECT" \
--no-standard-images --filter="${filter}" --format="table[no-heading](name)")
if [[ -z "$image_id" ]]; then
Expand Down

0 comments on commit 2458f33

Please sign in to comment.