Skip to content

Commit

Permalink
Merge pull request #13990 from found-it/bitnami-compat-updates
Browse files Browse the repository at this point in the history
Update the bitnami compat pipeline
  • Loading branch information
found-it authored Mar 2, 2024
2 parents 4a6b6bc + f0501e0 commit bdecf37
Showing 1 changed file with 19 additions and 11 deletions.
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

0 comments on commit bdecf37

Please sign in to comment.