Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Decouple build image job from e2e #1950

Merged
merged 8 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/build-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ on:
required: false
type: string
default: ""

pull_request_target:
types: [ opened, edited, synchronize, reopened, ready_for_review ]
permissions:
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout
Expand All @@ -29,11 +30,14 @@ jobs:
run: |
if [[ "${{ inputs.tag }}" != "" ]]; then
echo "tag=${{ inputs.tag }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.event_name }}" == "push" ]]; then
echo "tag=latest" >> $GITHUB_OUTPUT
else
{
echo 'tag<<TAGS'
echo 'PR-${{ github.event.pull_request.number }}'
echo '${{ github.event.pull_request.head.sha }}'
echo 'TAGS'
} >> "$GITHUB_OUTPUT"
fi
- name: Echo the tag
run: echo ${{ steps.get_tag.outputs.tag }}
build-image:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
env:
ITERATIONS: 40
SLEEP_SECONDS: 30
run: ./.github/scripts/release/wait_for_image.sh ${{ env.IMAGE_REPO }}:${{ github.event.inputs.name }} $ITERATIONS $SLEEP_SECONDS
run: ./.github/scripts/release/wait_for_image.sh ${{ env.IMAGE_REPO }}:${{ github.event.inputs.name }} ${{ env.ITERATIONS }} ${{ env.SLEEP_SECONDS }}
- name: Publish release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
name: TestSuite E2E

env:
IMAGE_REPO: europe-docker.pkg.dev/kyma-project/dev/lifecycle-manager
on:
workflow_dispatch:
inputs:
k8s_version:
description: With Kubernetes version
required: false
pull_request_target:
pull_request:
types: [ opened, edited, synchronize, reopened, ready_for_review ]
jobs:
build-image:
name: Build Image
uses: ./.github/workflows/build-image.yml
wait-for-image-build:
name: Wait for image build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Wait for the Docker image
timeout-minutes: 20
env:
ITERATIONS: 40
SLEEP_SECONDS: 30
run: ./.github/scripts/release/wait_for_image.sh ${{ env.IMAGE_REPO }}:${{ github.event.pull_request.head.sha }} ${{ env.ITERATIONS }} ${{ env.SLEEP_SECONDS}}
e2e-integration:
name: E2E
needs: build-image
needs: wait-for-image-build
strategy:
fail-fast: false
matrix:
Expand Down
Loading