Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the bitnami compat pipeline #13990

Merged
merged 1 commit into from
Mar 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 19 additions & 11 deletions pipelines/bitnami/compat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,36 @@ inputs:
The path to the root of the Dockerfile, relative to the image name.
required: true

commit:
description: |
The commit to check out for the bitnami repo
required: false

pipeline:
- uses: git-checkout
with:
repository: https://github.com/bitnami/containers
branch: main
destination: bitnami
destination: bitnami-containers
- runs: |
mkdir -p ${{targets.contextdir}}
mkdir -p "${{targets.contextdir}}"/opt/bitnami
mkdir -p "${{targets.contextdir}}"/bitnami/${{inputs.image}}

if [ ! -d "./bitnami/bitnami/${{inputs.image}}/${{inputs.version-path}}" ]; then
echo "./bitnami/bitnami/${{inputs.image}}/${{inputs.version-path}} does not exist"
exit 1
cd ./bitnami-containers

if [ ! -z ${{inputs.commit}} ]; then
git fetch --unshallow
git checkout ${{inputs.commit}}
fi

if [ -d "./bitnami/bitnami/${{inputs.image}}/${{inputs.version-path}}/prebuildfs" ]; then
cp -rf ./bitnami/bitnami/${{inputs.image}}/${{inputs.version-path}}/prebuildfs/* ${{targets.contextdir}}/
if [ ! -d "./bitnami/${{inputs.image}}/${{inputs.version-path}}" ]; then
echo "./bitnami/${{inputs.image}}/${{inputs.version-path}} does not exist"
exit 1
fi

if [ -d "./bitnami/bitnami/${{inputs.image}}/${{inputs.version-path}}/rootfs" ]; then
cp -rf ./bitnami/bitnami/${{inputs.image}}/${{inputs.version-path}}/rootfs/* ${{targets.contextdir}}/
if [ -d "./bitnami/${{inputs.image}}/${{inputs.version-path}}/prebuildfs" ]; then
cp -rf ./bitnami/${{inputs.image}}/${{inputs.version-path}}/prebuildfs/* ${{targets.contextdir}}/
fi

chmod g+rwX ${{targets.subpkgdir}}/opt/bitnami
if [ -d "./bitnami/${{inputs.image}}/${{inputs.version-path}}/rootfs" ]; then
cp -rf ./bitnami/${{inputs.image}}/${{inputs.version-path}}/rootfs/* ${{targets.contextdir}}/
fi