Skip to content

Commit

Permalink
Move GA builds to -pull, -push and -release files (#1065)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKalke authored Jul 15, 2024
1 parent 8ce3700 commit bd27e1c
Show file tree
Hide file tree
Showing 10 changed files with 143 additions and 228 deletions.
76 changes: 76 additions & 0 deletions .github/workflows/build-pull.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: serverless build (pull)

on:
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

jobs:
build-operator:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: serverless-operator
dockerfile: components/operator/Dockerfile

build-gitserver:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: gitserver
dockerfile: Dockerfile
context: tests/gitserver

build-serverless-controller:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-controller
dockerfile: components/serverless/deploy/manager/Dockerfile

build-serverless-webhook:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-webhook
dockerfile: components/serverless/deploy/webhook/Dockerfile

build-serverless-jobinit:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-build-init
dockerfile: components/serverless/deploy/jobinit/Dockerfile

build-nodejs18:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs18
dockerfile: nodejs18/Dockerfile
context: components/runtimes/nodejs

build-nodejs20:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs20
dockerfile: nodejs20/Dockerfile
context: components/runtimes/nodejs

build-python39:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python39
dockerfile: python39/Dockerfile
context: components/runtimes/python

build-python312:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python312
dockerfile: python312/Dockerfile
context: components/runtimes/python

build-java17:
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-java17-jvm-alpha
dockerfile: Dockerfile-jvm-runtime
context: components/runtimes/java17
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: serverless runtimes build (push)
name: serverless build (push)

on:
push:
Expand All @@ -8,8 +8,8 @@ on:
- 'examples/**'

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

jobs:
compute-tag:
Expand All @@ -23,47 +23,79 @@ jobs:
id: get_tag
run: echo ::set-output name=TAG::${{ github.sha }}

build-image-nodejs18:
build-operator:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: serverless-operator
dockerfile: components/operator/Dockerfile
tags: ${{ needs.compute-tag.outputs.tag }}

build-serverless-controller:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-controller
dockerfile: components/serverless/deploy/manager/Dockerfile
tags: ${{ needs.compute-tag.outputs.tag }}

build-serverless-webhook:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-webhook
dockerfile: components/serverless/deploy/webhook/Dockerfile
tags: ${{ needs.compute-tag.outputs.tag }}

build-serverless-jobinit:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-build-init
dockerfile: components/serverless/deploy/jobinit/Dockerfile
tags: ${{ needs.compute-tag.outputs.tag }}

build-nodejs18:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs18/ga
name: function-runtime-nodejs18
dockerfile: nodejs18/Dockerfile
context: components/runtimes/nodejs
tags: ${{ needs.compute-tag.outputs.tag }}

build-image-nodejs20:
build-nodejs20:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs20/ga
name: function-runtime-nodejs20
dockerfile: nodejs20/Dockerfile
context: components/runtimes/nodejs
tags: ${{ needs.compute-tag.outputs.tag }}

build-image-python39:
build-python39:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python39/ga
name: function-runtime-python39
dockerfile: python39/Dockerfile
context: components/runtimes/python
tags: ${{ needs.compute-tag.outputs.tag }}

build-image-python312:
build-python312:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python312/ga
name: function-runtime-python312
dockerfile: python312/Dockerfile
context: components/runtimes/python
tags: ${{ needs.compute-tag.outputs.tag }}

build-image-java17:
build-java17:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-java17-jvm-alpha/ga
name: function-runtime-java17-jvm-alpha
dockerfile: Dockerfile-jvm-runtime
context: components/runtimes/java17
tags: ${{ needs.compute-tag.outputs.tag }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
tags:
- '^v?\d+\.\d+\.\d+(?:-.*)?$'
permissions:
id-token: write
contents: read
id-token: write # This is required for requesting the JWT token
contents: read # This is required for actions/checkout

jobs:
compute-tag:
Expand All @@ -19,80 +19,80 @@ jobs:
id: get_tag
run: echo ::set-output name=TAG::${{ github.sha }}

build-release-serverless-operator:
build-operator:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: serverless-operator/ga
name: serverless-operator
dockerfile: components/operator/Dockerfile
build-arg: PURPOSE=release
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-serverless-controller:
build-serverless-controller:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-controller/ga
name: function-controller
dockerfile: components/serverless/deploy/manager/Dockerfile
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-serverless-webhook:
build-serverless-webhook:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-webhook/ga
name: function-webhook
dockerfile: components/serverless/deploy/webhook/Dockerfile
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-serverless-jobinit:
build-serverless-jobinit:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-build-init/ga
name: function-build-init
dockerfile: components/serverless/deploy/jobinit/Dockerfile
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-image-nodejs18:
build-nodejs18:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs18/ga
name: function-runtime-nodejs18
dockerfile: nodejs18/Dockerfile
context: components/runtimes/nodejs
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-image-nodejs20:
build-nodejs20:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-nodejs20/ga
name: function-runtime-nodejs20
dockerfile: nodejs20/Dockerfile
context: components/runtimes/nodejs
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-image-python39-legacy:
build-python39-legacy:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python39/ga
name: function-runtime-python39
dockerfile: python39/Dockerfile
context: components/runtimes/python
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-image-python39:
build-python39:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python39/ga
name: function-runtime-python39
dockerfile: python39/Dockerfile
context: components/runtimes/python
tags: ${{ needs.compute-tag.outputs.tag }}

build-release-image-python312:
build-python312:
needs: compute-tag
uses: kyma-project/test-infra/.github/workflows/image-builder.yml@main # Usage: kyma-project/test-infra/.github/workflows/image-builder.yml@main
with:
name: function-runtime-python312/ga
name: function-runtime-python312
dockerfile: python312/Dockerfile
context: components/runtimes/python
tags: ${{ needs.compute-tag.outputs.tag }}
19 changes: 0 additions & 19 deletions .github/workflows/gitserver-build-pull.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/integration-tests-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
make -C components/operator deploy
make -C tests/operator test
env:
IMG: europe-docker.pkg.dev/kyma-project/dev/serverless-operator/ga:PR-${{ github.event.number }}
IMG: europe-docker.pkg.dev/kyma-project/dev/serverless-operator:PR-${{ github.event.number }}
- if: ${{ always() }}
uses: ./.github/actions/collect-cluster-info

Expand All @@ -43,4 +43,4 @@ jobs:
make -C tests/serverless serverless-integration serverless-contract-tests
make remove-serverless
env:
IMG: europe-docker.pkg.dev/kyma-project/dev/serverless-operator/ga:PR-${{ github.event.number }}
IMG: europe-docker.pkg.dev/kyma-project/dev/serverless-operator:PR-${{ github.event.number }}
31 changes: 0 additions & 31 deletions .github/workflows/serverless-build-pull.yaml

This file was deleted.

Loading

0 comments on commit bd27e1c

Please sign in to comment.