release: install python3 and python3-pip in Cloud Build release steps gcr.io/google.com/cloudsdktool/cloud-sdk:592.0.0 (:latest) removed system python3 and python3-pip, causing release/cloudbuild.yaml and release/tests/cloudbuild.yaml to fail with exit code 127 when running pip3. Install python3, python3-pip, and required CLI tools via apt-get before invoking pip3, and update the comment in release-versions.yaml so cos-tools-multi-region-release is re-triggered upon submit to complete publishing cos-dkms v0.3.20 and cos-gpu-installer v2.8.0. BUG=b/581912067, b/577289798 TEST=presubmit and cos-tools-multi-region-release RELEASE_NOTE=None Change-Id: I10225e06347b39ef268af92d7816f4092673f110 Reviewed-on: https://cos-review.googlesource.com/c/cos/tools/+/235727 AI-Review: cloud-image-release <cloud-image-release@prod.google.com> Reviewed-by: He Gao <hegao@google.com> Cloud-Build: 228075978874@cloudbuild.gserviceaccount.com <228075978874@cloudbuild.gserviceaccount.com> Tested-by: Kevin Liu <zhihuil@google.com>
diff --git a/release/cloudbuild.yaml b/release/cloudbuild.yaml index 30a4836..2bdb452 100644 --- a/release/cloudbuild.yaml +++ b/release/cloudbuild.yaml
@@ -4,6 +4,10 @@ args: - '-c' - | + # Install python3, pip3, and curl (removed from cloud-sdk:592.0.0+) + apt-get update && \ + apt-get install -y --no-install-recommends ca-certificates curl python3 python3-pip && \ + # Download and install gcrane curl -L \ https://github.com/google/go-containerregistry/releases/latest/download/go-containerregistry_Linux_x86_64.tar.gz \
diff --git a/release/release-versions.yaml b/release/release-versions.yaml index 376b1c0..6576a31 100644 --- a/release/release-versions.yaml +++ b/release/release-versions.yaml
@@ -1,6 +1,6 @@ # This file is used to define the release versions of the containers. -# Changes in this file will trigger cos-tools-multi-region-release so -# be CAREFUL. +# Changes in this file will trigger cos-tools-multi-region-release +# (release/cloudbuild.yaml) so be CAREFUL. # # Note that please don't remove the "latest" tag from the release_tags list. # The "latest" tag is used in the production and removal of it will trigger
diff --git a/release/tests/cloudbuild.yaml b/release/tests/cloudbuild.yaml index 7f51775..b5e240b 100644 --- a/release/tests/cloudbuild.yaml +++ b/release/tests/cloudbuild.yaml
@@ -1,13 +1,20 @@ steps: - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' entrypoint: 'bash' - args: [ - '-c', - 'pip3 install --break-system-packages -r release/tests/requirements.txt && python3 release/tests/release-note-cve-verifier.py ${_BUILD_GCR}' - ] + args: + - '-c' + - | + apt-get update && \ + apt-get install -y --no-install-recommends git python3 python3-pip && \ + pip3 install --break-system-packages -r release/tests/requirements.txt && \ + python3 release/tests/release-note-cve-verifier.py ${_BUILD_GCR} - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' entrypoint: 'bash' - args: ['-c', - 'pip3 install --break-system-packages PyYAML && python3 release/tests/gpu-installer-verifier.py ${PROJECT_ID} ${_BUILD_GCR} ${_VM_PROJECT}' - ] + args: + - '-c' + - | + apt-get update && \ + apt-get install -y --no-install-recommends python3 python3-pip && \ + pip3 install --break-system-packages PyYAML && \ + python3 release/tests/gpu-installer-verifier.py ${PROJECT_ID} ${_BUILD_GCR} ${_VM_PROJECT} timeout: 3600s