From cc109b47a69099fab96bd62cf9be878535d6ccdb Mon Sep 17 00:00:00 2001 From: Fabricio Aguiar Date: Wed, 24 Feb 2021 18:07:32 -0300 Subject: [PATCH] Update CI and add FIPS test [noissue] --- .ci/ansible/start_container.yaml | 2 +- .github/workflows/ci.yml | 1 + .github/workflows/fips.yml | 61 ++++++++++++++++++++++++++++ .github/workflows/nightly.yml | 1 + .github/workflows/release.yml | 1 + .github/workflows/scripts/install.sh | 6 +++ 6 files changed, 71 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/fips.yml diff --git a/.ci/ansible/start_container.yaml b/.ci/ansible/start_container.yaml index bdf35b4..d75a708 100644 --- a/.ci/ansible/start_container.yaml +++ b/.ci/ansible/start_container.yaml @@ -74,7 +74,7 @@ follow_redirects: none register: result until: result.status == 200 - retries: 6 + retries: 12 delay: 5 rescue: - name: "Output pulp container log" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d47d5e..7e3dec7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -124,3 +124,4 @@ jobs: docker logs pulp || true docker exec pulp ls -latr /etc/yum.repos.d/ || true docker exec pulp cat /etc/yum.repos.d/* || true + docker exec pulp pip3 list diff --git a/.github/workflows/fips.yml b/.github/workflows/fips.yml new file mode 100644 index 0000000..060d66e --- /dev/null +++ b/.github/workflows/fips.yml @@ -0,0 +1,61 @@ +# WARNING: DO NOT EDIT! +# +# This file was generated by plugin_template, and is managed by it. Please use +# './plugin-template --github pulp_npm' to update this file. +# +# For more info visit https://github.com/pulp/plugin_template +--- +name: Pulp FIPS Nightly CI +on: + schedule: + # * is a special character in YAML so you have to quote this string + # runs at 4:00 UTC daily + - cron: '00 4 * * *' + +jobs: + vagrant: + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + include: + - test_type: pulp3-source-centos8-fips + - test_type: pulp3-source-centos7-fips + steps: + - uses: actions/checkout@v2.3.1 + with: + submodules: true + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + - name: Pulp Installer + run: | + cd .. + git clone --depth=1 https://github.com/pulp/pulp_installer + - name: Install Vagrant + shell: bash + run: | + cd ../pulp_installer/ + git submodule update --init + .github/workflows/scripts/install.sh ${{ matrix.test_type }} + - name: Run Vagrant + shell: bash + run: | + cd ../pulp_installer + sed -i "s/pulp-file/pulp-npm/g" example.dev-config.yml + sed -i "s/pulp_file/pulp_npm/g" example.dev-config.yml + .github/workflows/scripts/script.sh ${{ matrix.test_type }} + env: + PY_COLORS: '1' + ANSIBLE_FORCE_COLOR: '1' + - name: Testing + run: | + cd ../pulp_installer + vagrant ssh $1 -c "workon pulp && cd devel/pulp_npm && pip install -r functest_requirements.txt" + vagrant ssh $1 -c "workon pulp && cd devel/pulp_npm/ && pytest -v -r sx --color=yes --pyargs pulp_npm.tests.functional" + - name: After failure + if: failure() + run: | + cd ../pulp_installer + .github/workflows/scripts/after_failure.sh ${{ matrix.test_type }} diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 609e9a7..6b59952 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -149,3 +149,4 @@ jobs: docker logs pulp || true docker exec pulp ls -latr /etc/yum.repos.d/ || true docker exec pulp cat /etc/yum.repos.d/* || true + docker exec pulp pip3 list diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 487854b..c2cbfed 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -142,3 +142,4 @@ jobs: docker logs pulp || true docker exec pulp ls -latr /etc/yum.repos.d/ || true docker exec pulp cat /etc/yum.repos.d/* || true + docker exec pulp pip3 list diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index 68789d5..8409d63 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -13,6 +13,8 @@ REPO_ROOT="$PWD" set -euv +source .github/workflows/scripts/utils.sh + if [ "${GITHUB_REF##refs/tags/}" = "${GITHUB_REF}" ] then TAG_BUILD=0 @@ -92,3 +94,7 @@ fi ansible-playbook build_container.yaml ansible-playbook start_container.yaml + +echo ::group::PIP_LIST +cmd_prefix bash -c "pip3 list && pip3 install pipdeptree && pipdeptree" +echo ::endgroup::