1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-30 05:59:39 +02:00

fix(kanikoExecute) Apply workaround for multi stage builds (#3610)

This commit is contained in:
Ralf Pannemans 2022-03-07 11:42:33 +01:00 committed by GitHub
parent 9a3b800b9d
commit 424d8ec3a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -183,7 +183,7 @@ You can activate multiple builds using the parameters
}
func addKanikoExecuteFlags(cmd *cobra.Command, stepConfig *kanikoExecuteOptions) {
cmd.Flags().StringSliceVar(&stepConfig.BuildOptions, "buildOptions", []string{`--skip-tls-verify-pull`, `--ignore-path=/busybox`}, "Defines a list of build options for the [kaniko](https://github.com/GoogleContainerTools/kaniko) build.")
cmd.Flags().StringSliceVar(&stepConfig.BuildOptions, "buildOptions", []string{`--skip-tls-verify-pull`, `--ignore-path=/workspace`, `--ignore-path=/busybox`}, "Defines a list of build options for the [kaniko](https://github.com/GoogleContainerTools/kaniko) build.")
cmd.Flags().StringVar(&stepConfig.BuildSettingsInfo, "buildSettingsInfo", os.Getenv("PIPER_buildSettingsInfo"), "Build settings info is typically filled by the step automatically to create information about the build settings that were used during the mta build. This information is typically used for compliance related processes.")
cmd.Flags().BoolVar(&stepConfig.ContainerMultiImageBuild, "containerMultiImageBuild", false, "Defines if multiple containers should be build. Dockerfiles are used using the pattern **/Dockerfile*. Excludes can be defined via [`containerMultiImageBuildExcludes`](#containermultiimagebuildexscludes).")
cmd.Flags().StringSliceVar(&stepConfig.ContainerMultiImageBuildExcludes, "containerMultiImageBuildExcludes", []string{}, "Defines a list of Dockerfile paths to exclude from the build when using [`containerMultiImageBuild`](#containermultiimagebuild).")
@ -222,7 +222,7 @@ func kanikoExecuteMetadata() config.StepData {
Type: "[]string",
Mandatory: false,
Aliases: []config.Alias{},
Default: []string{`--skip-tls-verify-pull`, `--ignore-path=/busybox`},
Default: []string{`--skip-tls-verify-pull`, `--ignore-path=/workspace`, `--ignore-path=/busybox`},
},
{
Name: "buildSettingsInfo",

View File

@ -36,6 +36,7 @@ spec:
- --skip-tls-verify-pull
# fixing Kaniko issue https://github.com/GoogleContainerTools/kaniko/issues/1586
# as per comment https://github.com/GoogleContainerTools/kaniko/issues/1586#issuecomment-945718536
- --ignore-path=/workspace
- --ignore-path=/busybox
- name: buildSettingsInfo
type: string