[bitnami/*] Allow for publish pipeline's branch granularity (#8953)

Signed-off-by: FraPazGal <fdepaz@vmware.com>

Signed-off-by: FraPazGal <fdepaz@vmware.com>
This commit is contained in:
Francisco de Paz Galan
2022-10-05 16:20:43 +02:00
committed by GitHub
parent c4e828baad
commit 0d9dee43db
15 changed files with 648 additions and 7 deletions

View File

@@ -78,19 +78,29 @@ jobs:
exit 1
else
name="$(echo "${{ matrix.container }}" | awk -F '/' '{print $2}')"
branch="$(echo "${{ matrix.container }}" | awk -F '/' '{print $3}')"
echo "::set-output name=tag::${tag}"
echo "::set-output name=name::${name}"
echo "::set-output name=branch::${branch}"
echo "::set-output name=result::ok"
fi
else
# Container folder doesn't exists we are assuming a deprecation
echo "::set-output name=result::skip"
fi
- id: get-dsl-filepath
name: Get pipeline DSL filepath
run: |
dsl_path="${{ steps.get-container-metadata.outputs.name }}"
if [[ -d ".vib/${dsl_path}/${{ steps.get-container-metadata.outputs.branch }}" ]]; then
dsl_path="${dsl_path}/${{ steps.get-container-metadata.outputs.branch }}"
fi
echo "::set-output name=dsl_path::${dsl_path}"
- uses: vmware-labs/vmware-image-builder-action@main
name: 'Publish ${{ steps.get-container-metadata.outputs.name }}: ${{ steps.get-container-metadata.outputs.tag }}'
if: ${{ steps.get-container-metadata.outputs.result == 'ok' }}
with:
pipeline: ${{ steps.get-container-metadata.outputs.name }}/vib-publish.json
pipeline: ${{ steps.get-dsl-filepath.outputs.dsl_path }}/vib-publish.json
env:
# Path with docker resources
VIB_ENV_PATH: ${{ matrix.container }}

View File

@@ -78,8 +78,10 @@ jobs:
exit 1
else
name="$(echo "${{ matrix.container }}" | awk -F '/' '{print $2}')"
branch="$(echo "${{ matrix.container }}" | awk -F '/' '{print $3}')"
echo "::set-output name=tag::${tag}"
echo "::set-output name=name::${name}"
echo "::set-output name=branch::${branch}"
echo "::set-output name=result::ok"
fi
else
@@ -97,11 +99,19 @@ jobs:
echo "::add-mask::${marketplace_passwd}"
echo "::set-output name=marketplace_user::${marketplace_user}"
echo "::set-output name=marketplace_passwd::${marketplace_passwd}"
- id: get-dsl-filepath
name: Get pipeline DSL filepath
run: |
dsl_path="${{ steps.get-container-metadata.outputs.name }}"
if [[ -d ".vib/${dsl_path}/${{ steps.get-container-metadata.outputs.branch }}" ]]; then
dsl_path="${dsl_path}/${{ steps.get-container-metadata.outputs.branch }}"
fi
echo "::set-output name=dsl_path::${dsl_path}"
- uses: vmware-labs/vmware-image-builder-action@main
name: 'Publish ${{ steps.get-container-metadata.outputs.name }}: ${{ steps.get-container-metadata.outputs.tag }}'
if: ${{ steps.get-container-metadata.outputs.result == 'ok' }}
with:
pipeline: ${{ steps.get-container-metadata.outputs.name }}/vib-publish.json
pipeline: ${{ steps.get-dsl-filepath.outputs.dsl_path }}/vib-publish.json
env:
# Path with docker resources
VIB_ENV_PATH: ${{ matrix.container }}