forked from kyma-project/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ADO pipeline preview run feature and test (kyma-project#9462)
* Add sign-only mode. * POC of image building in ADO. * go mod tidy * Use default build config. * POC of image building in ADO. * Use default build config. * fix linter errors * rendertemplates * Move ado code to separate pacakge and make it testable. * Move build in ado code to separate package. This can be tested independent and reused in other tools. * Tests. TODOs for needed improvements. Comments. Small changes in code. * go mod tidy * Added building image-builder image to the prowjob. * Use go buildpack. Chainguard offers free access to the latest tag only. * Moved Dockerfile back to original location. images directory is not suitable for building image-builder. * Unexport options fields. * Remove testing prowjob. * Add preview run flag. * Add ADO pipeline preview run feature and test Added a feature in the image builder that allows ADO (Azure DevOps) pipeline to run in preview mode. This allows users to see the final YAML of the pipeline before executing it. The use of this option can be flagged with adoPreviewRun and it has been limited to work only when running in ADO and not locally. Made companion changes to the tests for these features ensuring all new code is covered. This addition was made to aid debug and development efforts by providing more comprehensive information about pipeline executions in ADO. * package not used in image-builder * File committed by mistake. * go mod tidy * Pull number should be expect only for presubmit job types. * Print exit code in new line. * Align with naming standard. * Add error handling for nil final yaml in ADO pipeline preview run This update adds an error message when the final yaml in the Azure DevOps (ADO) pipeline preview run is nil. This handling is necessary to give clearer feedback when the pipeline preview run fails due to a nil final yaml and to prevent runtime errors. * Add preview run option for Azure DevOps pipelines Refactored the Azure DevOps pipeline trigger functionality to support a "preview run" mode where users can see the generated pipeline yaml before running the actual pipeline. This feature is useful in creating or troubleshooting pipelines in Azure DevOps as it enables users to verify and adjust the yaml configuration before executing a pipeline run. This reduces the risk of pipeline failures due to misconfigurations. Added a new flag that allows the user to specify the path of a yaml file that contains the pipeline definition for the preview run. Made necessary changes in cmd/image-builder/main.go and pkg/azuredevops/pipelines/pipelines.go. Also modified some tests to accommodate these changes and ensure the functionality is working as expected in both preview run and standard run modes. * Review comments. * Added missing negation. Aligned variable name in if condition.
- Loading branch information
Showing
5 changed files
with
244 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.