Skip to content

Commit

Permalink
fix: ubuntu16 pre-build container (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
gsanchezgavier committed May 15, 2024
1 parent 1418bae commit de76068
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@ jobs:
molecule-packaging-tests:
name: Launch molecule tests with infra-agent package
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# test building and using pre-build containers.
build_docker: ["true",""]
env:
TESTING: 'true'
TESTING: ${{ matrix.build_docker}}
steps:
- uses: actions/checkout@v2

Expand Down
7 changes: 7 additions & 0 deletions prepare_platform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ set_platforms_config() {
yq -i ".platforms[] |= select(.name == \"$PLATFORM\") += {\"image\":\"$PLATFORM\", \"dockerfile\": \"./dockerfiles/$PLATFORM\"}" $FILE_PATH
else
yq -i ".platforms[] |= select(.name == \"$PLATFORM\") += {\"image\":\"ghcr.io/newrelic/pkg-installation-testing-action-$PLATFORM\"}" $FILE_PATH

# Prevent molecule to install extra tools in the pre-build image
# https://ansible.readthedocs.io/projects/molecule/guides/custom-image/
# ubuntu16 python 2 installation was being corrupted by this behaivor.
if [[ $PLATFORM == "ubuntu1604" ]]; then
yq -i ".platforms[] |= select(.name == \"$PLATFORM\") += {\"pre_build_image\": true}" $FILE_PATH
fi
fi

# debian based distributions need to set up the init command
Expand Down

0 comments on commit de76068

Please sign in to comment.