Main Integration #54
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
# This workflow is responsible for all kinds of integration tests run on pull request. | |
# Those tests depend on a container image so in the first job we wait for the image build to succeed. | |
name: Main Integration | |
on: | |
push: | |
paths-ignore: | |
- "docs/**" | |
- "**/*.md" | |
- "CODEOWNERS" | |
- "sec-scanners-config.yaml" | |
- ".github/**" #Ignoring since build job isn't triggered on the workflow directory changes | |
branches: | |
- main | |
schedule: | |
- cron: '0 5 * * *' # Run every day at 05:00 AM | |
jobs: | |
wait-for-image-build: | |
name: Wait for image build | |
runs-on: ubuntu-latest | |
outputs: | |
sha: ${{ steps.get-sha.outputs.sha }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/wait-for-job-succeed-or-fail | |
if: ${{ github.event_name != 'schedule' }} | |
with: | |
job-name: 'post-api-gateway-manager-build' | |
github-auth-token: ${{ secrets.GITHUB_TOKEN }} | |
commit-ref: ${{ github.sha }} | |
- id: get-sha | |
run: | | |
if [ "${{ github.event_name }}" != "schedule" ]; then | |
echo "sha=${{ github.sha }}" >> $GITHUB_OUTPUT | |
else | |
echo "sha=$(./scripts/get_latest_build_sha.sh)" >> $GITHUB_OUTPUT | |
fi | |
integration-tests: | |
name: Integration tests | |
runs-on: ubuntu-latest | |
needs: [wait-for-image-build] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/integration-tests | |
with: | |
prerequisites_target: install-prerequisites | |
manager_image: "europe-docker.pkg.dev/kyma-project/prod/api-gateway-manager:${{ needs.wait-for-image-build.outputs.sha }}" | |
client_id: ${{ secrets.CLIENT_ID }} | |
client_secret: ${{ secrets.CLIENT_SECRET }} | |
oidc_issuer_url: ${{ secrets.OIDC_ISSUER_URL }} | |
integration-tests-istio-module: | |
name: Integration tests with Istio module | |
runs-on: ubuntu-latest | |
needs: [wait-for-image-build] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/integration-tests | |
with: | |
prerequisites_target: install-prerequisites-with-istio-from-manifest | |
manager_image: "europe-docker.pkg.dev/kyma-project/prod/api-gateway-manager:${{ needs.wait-for-image-build.outputs.sha }}" | |
client_id: ${{ secrets.CLIENT_ID }} | |
client_secret: ${{ secrets.CLIENT_SECRET }} | |
oidc_issuer_url: ${{ secrets.OIDC_ISSUER_URL }} | |
upgrade-tests: | |
name: Upgrade tests | |
runs-on: ubuntu-latest | |
needs: [wait-for-image-build] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/upgrade-test | |
with: | |
test_upgrade_img: "europe-docker.pkg.dev/kyma-project/prod/api-gateway-manager:${{ needs.wait-for-image-build.outputs.sha }}" | |
client_id: ${{ secrets.CLIENT_ID }} | |
client_secret: ${{ secrets.CLIENT_SECRET }} | |
oidc_issuer_url: ${{ secrets.OIDC_ISSUER_URL }} | |
target_branch: ${{github.ref_name}} | |
slack_failed_notification: | |
name: Slack Notification | |
runs-on: ubuntu-latest | |
if: ${{ failure() }} | |
needs: [integration-tests,integration-tests-istio-module,upgrade-tests] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Notify | |
uses: ./.github/actions/slack-notification-failed-workflow | |
with: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} |