kyma-project / test-infra

Test infrastructure for the Kyma project.
https://status.build.kyma-project.io/
Apache License 2.0
38 stars 181 forks source link

image-builder github action dry-run #11025

Open dekiel opened 2 months ago

dekiel commented 2 months ago

Description

Image builder supports push or pull_request_target events only. Because the workflow file is taken from base branch for these events, it makes difficult to test changes in workflows using image-builder reusable workflow and image-builder reusable workflow itself. To make testing easier an image-builder reusable workflow can have a dry-run input.

When dry-run is set to true, an image-builder would not call ADO API but print call parameters values only. Because there won't be a real call to ADO, an execution will not require ADO PAT and OIDC token. In dry-run mode image-builder reusable workflow will allow to be executed on pull_request event, allowing user to test changes in a workflow in a pull request.

When running in dry run mode, an image-builder reusable workflow should return as output relevant configuration and ado api calls parameters values used by the tool. This will allow testing the output against expected values.

Acceptance Criteria

dekiel commented 2 months ago

The dry-run flag was partially implemented in https://github.com/kyma-project/test-infra/pull/10902. The flag is available in the tool with minimal functionality. The support for the flag should be added to the image-builder github action. and reusable workflow.