Skip to content

Commit

Permalink
chore: switch main build jobs
Browse files Browse the repository at this point in the history
/kind chore
/area api-gateway

Remove wait-for-build usage from main-integration.yaml and build directly.
  • Loading branch information
Ressetkk committed Sep 10, 2024
1 parent 19d1639 commit a5e3e26
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions .github/workflows/main-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@

name: Main Integration

permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout

on:
push:
paths-ignore:
Expand All @@ -17,33 +21,21 @@ on:
- 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
build:
name: build api-gateway image
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: api-gateway
dockerfile: Dockerfile
context: .
build-args: |
VERSION=${{ github.sha }}
tags: "${{ github.sha }}"

integration-tests:
name: Integration tests
runs-on: ubuntu-latest
needs: [wait-for-image-build]
needs: [build]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -58,7 +50,7 @@ jobs:
upgrade-tests:
name: Upgrade tests
runs-on: ubuntu-latest
needs: [wait-for-image-build]
needs: [build]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -74,7 +66,7 @@ jobs:
custom-domain-integration-gcp:
name: Custom domain integration GCP
runs-on: ubuntu-latest
needs: [wait-for-image-build]
needs: [build]
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -93,7 +85,7 @@ jobs:
custom-domain-integration-aws:
name: Custom domain integration AWS
runs-on: ubuntu-latest
needs: [wait-for-image-build]
needs: [build]
steps:
- uses: actions/checkout@v4
with:
Expand Down

0 comments on commit a5e3e26

Please sign in to comment.