Integration Tests #529
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Integration Tests | |
on: # yamllint disable-line rule:truthy | |
workflow_run: | |
workflows: | |
- Build | |
branches: | |
- main | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
integration-tests: | |
strategy: | |
matrix: | |
test_type: | |
- isv | |
- community | |
- isv-fbc-bundle | |
- isv-fbc-catalog | |
fail-fast: false | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare | |
id: prepare | |
run: | | |
echo "suffix=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT | |
- name: Install dependencies | |
run: | | |
# Install python dependencies | |
pip install --user openshift pygithub | |
# Add certificates to trusted list | |
sudo cp operator-pipeline-images/certs/* /usr/local/share/ca-certificates | |
# Rename all .pem files to .crt to allow update-ca-certificates | |
for file in /usr/local/share/ca-certificates/*.pem | |
do | |
sudo mv "$file" "${file%.pem}.crt" | |
done | |
sudo update-ca-certificates | |
echo "${{ secrets.VAULT_PASSWORD }}" > "$HOME"/.vault-password | |
# secret used also in hosted pipeline for enabling | |
# access to cluster for tkn command log accessing | |
mkdir -p "$HOME"/.kube | |
ansible-vault decrypt \ | |
--vault-password-file "$HOME"/.vault-password \ | |
--output "$HOME"/.kube/config \ | |
ansible/vaults/integration-tests/ci-pipeline-kubeconfig | |
# secret used also in hosted pipeline for enabling | |
# cloning of the repository | |
mkdir -p "$HOME"/.ssh | |
ansible-vault decrypt \ | |
--vault-password-file "$HOME"/.vault-password \ | |
--output "$HOME"/.ssh/id_rsa \ | |
ansible/vaults/integration-tests/ci-pipeline-github-ssh-key | |
- name: Run the integration tests ansible playbook | |
uses: dawidd6/action-ansible-playbook@v2 | |
with: | |
playbook: playbooks/operator-pipeline-integration-tests.yml | |
directory: ./ansible | |
requirements: playbooks/requirements.yml | |
vault_password: ${{secrets.VAULT_PASSWORD}} | |
options: | | |
-e "test_type=${{ matrix.test_type }}" | |
-e "oc_namespace=int-tests-${{ matrix.test_type }}-${{ github.run_number }}-${{ github.run_attempt }}" | |
-e "integration_tests_operator_bundle_version=0.1.${{ github.run_number }}-${{ github.run_attempt }}" | |
-e "operator_pipeline_image_tag=${{ github.sha }}" | |
-e "suffix=${{ steps.prepare.outputs.suffix }}" | |
--skip-tags=signing-pipeline | |
-v |