diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index b40be4c..8fc4893 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -14,8 +14,25 @@ jobs: - name: Molecule tests uses: ./ with: - repo_base_url: 'https://download.newrelic.com/infrastructure_agent' + repo_base_url: 'http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent' + # repo_base_url: 'https://download.newrelic.com/infrastructure_agent' package_name: 'newrelic-infra' - package_version: '1.52.1' + package_version: '1.52.3' gpg_key: 'https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg' - platforms: "al2,al2023,centos7,centos8,debian-bullseye,debian-buster,redhat8,redhat9,suse15.2,suse15.3,suse15.4,suse15.5,ubuntu1604,ubuntu1804,ubuntu2004,ubuntu2204" + platforms: "ubuntu1604,ubuntu1804,ubuntu2204,ubuntu2404" + molecule-packaging-tests-with-images: + name: Launch molecule tests with infra-agent package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: pull + run: docker pull ghcr.io/newrelic/pkg-installation-testing-action-ubuntu1604 + - name: Molecule tests + uses: ./ + with: + repo_base_url: 'http://nr-downloads-ohai-staging.s3-website-us-east-1.amazonaws.com/infrastructure_agent' + # repo_base_url: 'https://download.newrelic.com/infrastructure_agent' + package_name: 'newrelic-infra' + package_version: '1.52.3' + gpg_key: 'https://download.newrelic.com/infrastructure_agent/gpg/newrelic-infra.gpg' + platforms: "ubuntu1604,ubuntu1804,ubuntu2204,ubuntu2404" diff --git a/prepare_platform.sh b/prepare_platform.sh index 39cdad1..02580dc 100755 --- a/prepare_platform.sh +++ b/prepare_platform.sh @@ -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