Skip to content

Commit d702fc9

Browse files
committed
GCP image pipeline final tweaks and additions
1 parent 1bb953e commit d702fc9

File tree

1 file changed

+12
-19
lines changed

1 file changed

+12
-19
lines changed

.github/actions/shared-steps/action.yml

Lines changed: 12 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,12 @@ runs:
438438
# don't fail if this doesn't exist, we may not always generate it
439439
sudo mv sbom-data-*.json $(basename ${image_file}).sbom-data.json || true
440440
441+
- name: Generate SBOM
442+
shell: bash
443+
run: |
444+
echo "Generating SBOM document of ${{ env.IMAGE_FILE }}"
445+
sudo .venv-sbom/bin/python3 sbom-tools/sbom_generator.py "${{ env.IMAGE_NAME }}" "${{ env.IMAGE_FILE }}.sbom-data.json" "${{ env.IMAGE_FILE }}.sbom.spdx.json"
446+
441447
- id: 'google-auth-dev-images'
442448
if: env.IMAGE_TYPE == 'gcp'
443449
uses: 'google-github-actions/auth@v2'
@@ -449,11 +455,16 @@ runs:
449455
if: env.IMAGE_TYPE == 'gcp'
450456
uses: 'google-github-actions/[email protected]'
451457

452-
- name: 'Upload output to GCP storage bucket'
458+
- name: Upload output to GCP storage bucket
453459
if: env.IMAGE_TYPE == 'gcp'
454460
shell: bash
455461
run: gcloud storage cp ${{ env.IMAGE_FILE }} gs://almalinux-images-dev/almalinux-${version_major}${{ inputs.arch == 'aarch64' && '-arm64' || '' }}-v$(date +'%Y%m%d')/root.tar.gz
456462

463+
- name: Upload SBOM data to GCP storage bucket
464+
if: env.IMAGE_TYPE == 'gcp'
465+
shell: bash
466+
run: gcloud storage cp ${{ env.IMAGE_FILE }}.sbom.spdx.json gs://almalinux-images-dev-sbom/almalinux-${version_major}${{ inputs.arch == 'aarch64' && '-arm64' || '' }}-v$(date +'%Y%m%d').sbom.spdx.json
467+
457468
- name: Clone gce_image_publish repo
458469
if: env.IMAGE_TYPE == 'gcp'
459470
uses: actions/checkout@v5
@@ -497,24 +508,6 @@ runs:
497508
-source_gcs_path="gs://almalinux-images-dev/" \
498509
vm-scripts/gcp/almalinux_${version_major}${{ inputs.arch == 'aarch64' && '_arm64' || '' }}.publish.json
499510
500-
# - name: 'Run Google cloud-image-testing tests (basic suite)'
501-
# if: env.IMAGE_TYPE == 'gcp' && inputs.run_test == 'true'
502-
# shell: bash
503-
# run: |
504-
# cd cloud-image-tests
505-
# ./bin/manager \
506-
# -local_path bin \
507-
# -project almalinux-image-testing-469421 \
508-
# -filter '^(cvm|livemigrate|suspendresume|loadbalancer|guestagent|hostnamevalidation|imageboot|licensevalidation|network|security|hotattach|lssd|disk|packagevalidation|ssh|metadata|vmspec)$' \
509-
# -images 'projects/almalinux-dev-images-469421/global/images/family/almalinux-${{ env.version_major }}${{ inputs.arch == 'aarch64' && '-arm64' || '' }}' \
510-
# -parallel_stagger 10s -parallel_count 20
511-
512-
- name: Generate SBOM
513-
shell: bash
514-
run: |
515-
echo "Generating SBOM document of ${{ env.IMAGE_FILE }}"
516-
sudo .venv-sbom/bin/python3 sbom-tools/sbom_generator.py "${{ env.IMAGE_NAME }}" "${{ env.IMAGE_FILE }}.sbom-data.json" "${{ env.IMAGE_FILE }}.sbom.spdx.json"
517-
518511
- name: Test ${{ inputs.type }} ${{ inputs.variant }} image
519512
if: inputs.run_test == 'true' && contains(inputs.type, 'vagrant')
520513
shell: bash

0 commit comments

Comments
 (0)