Skip to content

Commit

Permalink
Support custom tags on pr images in image-builder reusable workflow (#…
Browse files Browse the repository at this point in the history
…12069)

* Use image-builder-client-config.yaml. It contains only configuration relevant for client.

* Refresh build status more often to decrease build time on gh. Shorter refresh time will decrease possible delay.

* Use newer image

* Use image with removed UseKanikoConfigFromPR flag
  • Loading branch information
dekiel authored Oct 7, 2024
1 parent 4110808 commit 610a437
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 42 deletions.
4 changes: 2 additions & 2 deletions .github/actions/image-builder/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inputs:
config:
description: Path to the config file
required: false
default: "./configs/kaniko-build-config.yaml"
default: "./configs/image-builder-client-config.yaml"
env-file:
description: Path to file with environment variables to be loaded in the build
required: false
Expand Down Expand Up @@ -78,7 +78,7 @@ runs:
id: prepare-tags
shell: bash
- uses: docker://europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240705-0b2e6015
- uses: docker://europe-docker.pkg.dev/kyma-project/prod/image-builder:v20241007-36d14dd7
id: build
with:
args: --name=${{ inputs.image-name }} --context=${{ inputs.context }} --dockerfile=${{ inputs.dockerfile }} --azure-access-token=${{ inputs.ado-token }} --oidc-token=${{ inputs.oidc-token }} ${{ steps.prepare-build-args.outputs.build-args }} ${{ steps.prepare-tags.outputs.tags }} --export-tags=${{ inputs.export-tags }} --config=${{ inputs.config }} --env-file=${{ inputs.env-file }} --build-in-ado=true
2 changes: 1 addition & 1 deletion .github/workflows/image-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,4 @@ jobs:
image-name: ${{ inputs.name }}
dockerfile: ${{ inputs.dockerfile }}
env-file: ${{ inputs.env-file }}
config: "./configs/kaniko-build-config.yaml"
config: "./configs/image-builder-client-config.yaml"
4 changes: 2 additions & 2 deletions .github/workflows/pull-validate-kaniko-build-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request_target:
types: [opened, edited, synchronize, reopened, ready_for_review]
paths:
- "configs/kaniko-build-config.yaml"
- "configs/image-builder-client-config.yaml"
- ".github/workflows/pull-validate-kaniko-build-config.yaml"

permissions:
Expand Down Expand Up @@ -53,4 +53,4 @@ jobs:
- uses: docker://europe-docker.pkg.dev/kyma-project/prod/image-builder:v20240621-63f4f2b1
id: build
with:
args: --name=test-infra/ginkgo --context=. --dockerfile=prow/images/ginkgo/Dockerfile --azure-access-token=${{ steps.secrets.outputs.ado-pat }} --oidc-token=${{ steps.get_oidc.outputs.jwt }} --env-file='envs' --build-in-ado=true --test-kaniko-build-config=true --config="./configs/kaniko-build-config.yaml"
args: --name=test-infra/ginkgo --context=. --dockerfile=prow/images/ginkgo/Dockerfile --azure-access-token=${{ steps.secrets.outputs.ado-pat }} --oidc-token=${{ steps.get_oidc.outputs.jwt }} --env-file='envs' --build-in-ado=true --test-kaniko-build-config=true --config="./configs/image-builder-client-config.yaml"
9 changes: 9 additions & 0 deletions configs/image-builder-client-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
log-format: json
ado-config:
ado-organization-url: https://dev.azure.com/hyperspace-pipelines
ado-project-name: kyma
ado-pipeline-id: 14902
ado-retry-strategy:
attempts: 3
delay: 5s
ado-refresh-interval: 15s
37 changes: 0 additions & 37 deletions configs/kaniko-build-config.yaml

This file was deleted.

0 comments on commit 610a437

Please sign in to comment.