Integration Tests #18
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-certified-operators: | |
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 | |
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 certified operators 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: | | |
-i inventory/operator-pipeline-integration-tests | |
-e "oc_namespace=integration-tests-${{ github.run_number }}-${{ github.run_attempt }}" | |
-e "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 | |
integration-tests-community-operators: | |
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 | |
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 community operators integration tests ansible playbook | |
uses: dawidd6/action-ansible-playbook@v2 | |
with: | |
playbook: playbooks/community-operators-integration-tests.yaml | |
directory: ./ansible | |
requirements: playbooks/requirements.yml | |
vault_password: ${{secrets.VAULT_PASSWORD}} | |
options: | | |
-i inventory/operator-pipeline-integration-tests | |
-e "oc_namespace=integration-tests-community-${{ github.run_number }}-${{ github.run_attempt }}" | |
-e "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,import-index-images | |
-v |