From ef9d8046f005fe5aa876cc72f0eb8660c488fdd2 Mon Sep 17 00:00:00 2001 From: Jose Antonio Carmona Date: Thu, 13 Oct 2022 16:59:07 +0200 Subject: [PATCH] [bitnami/*] Allow VIB action configuration per asset (#12947) Signed-off-by: Jose Antonio Carmona Signed-off-by: Jose Antonio Carmona --- .github/workflows/cd-pipeline.yml | 13 +++++++++++++ .github/workflows/ci-pipeline.yml | 13 +++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/cd-pipeline.yml b/.github/workflows/cd-pipeline.yml index 5ca76f302c..2c57013ed0 100644 --- a/.github/workflows/cd-pipeline.yml +++ b/.github/workflows/cd-pipeline.yml @@ -142,11 +142,24 @@ jobs: name: Checkout Repository with: path: charts + - id: get-asset-vib-config + name: Get asset-specific configuration for VIB action + run: | + config_file="charts/.vib/${{ needs.get-chart.outputs.chart }}/vib-action.config" + + # Supported configuration customizations and default values + verification_mode="PARALLEL" + + if [[ -f $config_file ]]; then + verification_mode="$(cat $config_file | grep 'verification-mode' | cut -d'=' -f2)" + fi + echo "::set-output name=verification_mode::${verification_mode}" - uses: vmware-labs/vmware-image-builder-action@main name: Verify and publish ${{ needs.get-chart.outputs.chart }} with: pipeline: ${{ needs.get-chart.outputs.chart }}/vib-publish.json config: charts/.vib/ + verification-mode: ${{ steps.get-asset-vib-config.outputs.verification_mode }} env: VIB_ENV_TARGET_PLATFORM: ${{ secrets.VIB_ENV_TARGET_PLATFORM }} VIB_ENV_ALTERNATIVE_TARGET_PLATFORM: ${{ secrets.VIB_ENV_ALTERNATIVE_TARGET_PLATFORM }} diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index fb34c8eb7a..3301a602ca 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -98,10 +98,23 @@ jobs: with: ref: ${{ github.event.pull_request.head.ref }} repository: ${{ github.event.pull_request.head.repo.full_name }} + - id: get-asset-vib-config + name: Get asset-specific configuration for VIB action + run: | + config_file=".vib/${{ needs.get-chart.outputs.chart }}/vib-action.config" + + # Supported configuration customizations and default values + verification_mode="PARALLEL" + + if [[ -f $config_file ]]; then + verification_mode="$(cat $config_file | grep 'verification-mode' | cut -d'=' -f2)" + fi + echo "::set-output name=verification_mode::${verification_mode}" - uses: vmware-labs/vmware-image-builder-action@main name: Verify ${{ needs.get-chart.outputs.chart }} with: pipeline: ${{ needs.get-chart.outputs.chart }}/vib-verify.json + verification-mode: ${{ steps.get-asset-vib-config.outputs.verification_mode }} env: # Target-Platform used by default VIB_ENV_TARGET_PLATFORM: ${{ secrets.VIB_ENV_TARGET_PLATFORM }}