diff --git a/Makefile b/Makefile index 7fa009580..370b6877d 100644 --- a/Makefile +++ b/Makefile @@ -65,8 +65,8 @@ dev-image: echo "ERROR: QUAY_USERNAME is not set"; \ exit 1; \ fi - docker build . -t quay.io/$(QUAY_USERNAME)/hacbs-jvm-controller:dev - docker push quay.io/$(QUAY_USERNAME)/hacbs-jvm-controller:dev + docker build . -t quay.io/$(QUAY_USERNAME)/hacbs-jvm-controller:"$${JBS_QUAY_IMAGE_TAG:-dev}" + docker push quay.io/$(QUAY_USERNAME)/hacbs-jvm-controller:"$${JBS_QUAY_IMAGE_TAG:-dev}" dev: dev-image cd java-components && mvn clean install -Dlocal -DskipTests -Ddev diff --git a/deploy/tasks/pre-build.yaml b/deploy/tasks/pre-build.yaml index b4a6f9d11..aef594724 100644 --- a/deploy/tasks/pre-build.yaml +++ b/deploy/tasks/pre-build.yaml @@ -46,10 +46,13 @@ spec: type: string - name: RECIPE_IMAGE description: The image from the build recipe to use + - name: BUILD_TOOL + description: The build tool to use. + - name: BUILD_PLUGINS + description: Comma separated list of build plugins that should be disabled. + default: "" - name: BUILD_SCRIPT description: The build script to embed with the Containerfile - - name: PREPROCESSOR_ARGS - description: The arguments for the build preprocessor - name: ORAS_OPTIONS type: string description: Optional environment variable string for build-trusted-artifacts @@ -103,7 +106,7 @@ spec: memory: 512Mi script: | $(params.BUILD_SCRIPT) - /opt/jboss/container/java/run/run-java.sh $(params.PREPROCESSOR_ARGS) + /opt/jboss/container/java/run/run-java.sh $(params.BUILD_TOOL)-prepare $(workspaces.source.path)/source --recipe-image=$(params.RECIPE_IMAGE) --request-processor-image=$(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE) --disabled-plugins=$(params.BUILD_PLUGINS) - name: create-pre-build-source image: $(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE) securityContext: diff --git a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java index 6ef870d3e..cee48aa4e 100644 --- a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java +++ b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/AbstractPreprocessor.java @@ -1,14 +1,16 @@ package com.redhat.hacbs.container.build.preprocessor; +import java.io.IOException; +import java.nio.file.Files; import java.nio.file.Path; +import java.nio.file.Paths; import java.util.List; +import io.quarkus.logging.Log; import picocli.CommandLine; /** - * We keep all the options the same between maven and gradle for now, - * to keep the pipeline setup simpler. - * + * We keep all the options the same between maven, gradle, sbt and ant for now to keep the pipeline setup simpler. * Some of these may be ignored by different processors */ public abstract class AbstractPreprocessor implements Runnable { @@ -16,6 +18,69 @@ public abstract class AbstractPreprocessor implements Runnable { @CommandLine.Parameters(description = "The directory to process") protected Path buildRoot; - @CommandLine.Option(names = { "-dp", "--disable-plugin" }, paramLabel = "", description = "The plugin to disable") + @CommandLine.Option(names = { "-dp", "--disabled-plugins" }, paramLabel = "", description = "The plugin to disable", split=",") protected List disabledPlugins; + + @CommandLine.Option(names = "--recipe-image", required = true) + String recipeImage; + + @CommandLine.Option(names = "--request-processor-image", required = true) + String buildRequestProcessorImage; + + protected enum ToolType { + ANT, + GRADLE, + MAVEN, + SBT + } + + protected ToolType type; + + @Override + public void run() { + Path jbsDirectory = Path.of(buildRoot.toString(), ".jbs"); + //noinspection ResultOfMethodCallIgnored + jbsDirectory.toFile().mkdirs(); + + String containerFile = """ + FROM %s + USER 0 + WORKDIR /var/workdir + RUN mkdir -p /var/workdir/software/settings /original-content/marker + ARG CACHE_URL="" + ENV CACHE_URL=$CACHE_URL + COPY .jbs/run-build.sh /var/workdir + COPY . /var/workdir/workspace/source/ + RUN /var/workdir/run-build.sh + """.formatted(recipeImage); + + // TODO: This is a bit of a hack but as Ant doesn't deploy and the previous implementation relied upon using the + // BuildRequestProcessorImage we need to modify the Containerfile. In future the ant-build.sh should probably + // encapsulate this. + if (type == ToolType.ANT) { + // Don't think we need to mess with keystore as copy-artifacts is simply calling copy commands. + containerFile += + """ + FROM %s AS build-request-processor + USER 0 + WORKDIR /var/workdir + COPY --from=0 /var/workdir/ /var/workdir/ + RUN /opt/jboss/container/java/run/run-java.sh copy-artifacts --source-path=/var/workdir/workspace/source --deploy-path=/var/workdir/workspace/artifacts + FROM scratch + COPY --from=1 /var/workdir/workspace/artifacts / + """.formatted(buildRequestProcessorImage); + } else { + containerFile += + """ + FROM scratch + COPY --from=0 /var/workdir/workspace/artifacts / + """; + } + try { + Files.writeString(Paths.get(jbsDirectory.toString(), "Containerfile"), containerFile); + } catch (IOException e) { + Log.errorf("Unable to write Containerfile", e); + throw new RuntimeException(e); + } + } } diff --git a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/ant/AntPrepareCommand.java b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/ant/AntPrepareCommand.java index ba60d7923..17ced4d44 100644 --- a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/ant/AntPrepareCommand.java +++ b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/ant/AntPrepareCommand.java @@ -11,8 +11,13 @@ */ @CommandLine.Command(name = "ant-prepare") public class AntPrepareCommand extends AbstractPreprocessor { + + public AntPrepareCommand() { + type = ToolType.ANT; + } + @Override public void run() { - + super.run(); } } diff --git a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/gradle/GradlePrepareCommand.java b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/gradle/GradlePrepareCommand.java index c64562d0f..44c161a4b 100644 --- a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/gradle/GradlePrepareCommand.java +++ b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/gradle/GradlePrepareCommand.java @@ -40,9 +40,14 @@ public class GradlePrepareCommand extends AbstractPreprocessor { "version.gradle" }; + public GradlePrepareCommand() { + type = ToolType.GRADLE; + } + @Override public void run() { try { + super.run(); setupInitScripts(); Files.walkFileTree(buildRoot, new SimpleFileVisitor<>() { diff --git a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/maven/MavenPrepareCommand.java b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/maven/MavenPrepareCommand.java index 4c91d9d2d..3ef199ef1 100644 --- a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/maven/MavenPrepareCommand.java +++ b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/maven/MavenPrepareCommand.java @@ -40,8 +40,13 @@ @CommandLine.Command(name = "maven-prepare") public class MavenPrepareCommand extends AbstractPreprocessor { + public MavenPrepareCommand() { + type = ToolType.MAVEN; + } + @Override public void run() { + super.run(); try { Files.walkFileTree(buildRoot, new SimpleFileVisitor<>() { diff --git a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/sbt/SBTPrepareCommand.java b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/sbt/SBTPrepareCommand.java index dea381287..b3d44a7f1 100644 --- a/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/sbt/SBTPrepareCommand.java +++ b/java-components/build-request-processor/src/main/java/com/redhat/hacbs/container/build/preprocessor/sbt/SBTPrepareCommand.java @@ -10,7 +10,12 @@ @CommandLine.Command(name = "sbt-prepare") public class SBTPrepareCommand extends AbstractPreprocessor { + public SBTPrepareCommand() { + type = ToolType.SBT; + } + @Override public void run() { + super.run(); } } diff --git a/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/GradlePreprocessorTestCase.java b/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/GradlePreprocessorTestCase.java index fa91fbcef..4f960c81a 100644 --- a/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/GradlePreprocessorTestCase.java +++ b/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/GradlePreprocessorTestCase.java @@ -22,6 +22,8 @@ public List getCommand() { var args = buildInfoLocator.lookupDisabledPlugins(GRADLE); var command = new ArrayList(1 + 2 * args.size()); command.add("gradle-prepare"); + command.add("--recipe-image=foobar"); + command.add("--request-processor-image=barfoo"); args.forEach(arg -> { command.add("-dp"); command.add(arg); diff --git a/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/MavenPreprocessorTestCase.java b/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/MavenPreprocessorTestCase.java index 1eb528585..470904d70 100644 --- a/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/MavenPreprocessorTestCase.java +++ b/java-components/build-request-processor/src/test/java/com/redhat/hacbs/container/build/MavenPreprocessorTestCase.java @@ -22,6 +22,8 @@ public List getCommand() { var args = buildInfoLocator.lookupDisabledPlugins(MAVEN); var command = new ArrayList(1 + 2 * args.size()); command.add("maven-prepare"); + command.add("--recipe-image=foobar"); + command.add("--request-processor-image=barfoo"); args.forEach(arg -> { command.add("-dp"); command.add(arg); diff --git a/java-components/pom.xml b/java-components/pom.xml index 0d2fe06de..23a195480 100644 --- a/java-components/pom.xml +++ b/java-components/pom.xml @@ -71,6 +71,8 @@ 2.4.7 false + + dev @@ -452,7 +454,7 @@ ${env.QUAY_USERNAME} - dev + ${imageTag} true true mutable-jar @@ -611,5 +613,16 @@ management-console - + + + true + + env.JBS_QUAY_IMAGE_TAG + + + + ${env.JBS_QUAY_IMAGE_TAG} + + + diff --git a/pkg/reconciler/dependencybuild/buildrecipeyaml.go b/pkg/reconciler/dependencybuild/buildrecipeyaml.go index 290e515a6..e9f442b0d 100644 --- a/pkg/reconciler/dependencybuild/buildrecipeyaml.go +++ b/pkg/reconciler/dependencybuild/buildrecipeyaml.go @@ -146,14 +146,14 @@ func createDeployPipelineSpec(jbsConfig *v1alpha1.JBSConfig, buildRequestProcess } return ps, nil } -func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfig *v1alpha1.JBSConfig, systemConfig *v1alpha1.SystemConfig, recipe *v1alpha1.BuildRecipe, db *v1alpha1.DependencyBuild, paramValues []tektonpipeline.Param, buildRequestProcessorImage string, buildId string, existingImages map[string]string) (*tektonpipeline.PipelineSpec, string, string, string, error) { +func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfig *v1alpha1.JBSConfig, systemConfig *v1alpha1.SystemConfig, recipe *v1alpha1.BuildRecipe, db *v1alpha1.DependencyBuild, paramValues []tektonpipeline.Param, buildRequestProcessorImage string, buildId string, existingImages map[string]string) (*tektonpipeline.PipelineSpec, string, error) { // Rather than tagging with hash of json build recipe, buildrequestprocessor image and db.Name as the former two // could change with new image versions just use db.Name (which is a hash of scm url/tag/path so should be stable) imageId := db.Name zero := int64(0) verifyBuiltArtifactsArgs := verifyParameters(jbsConfig, recipe) - preBuildImageArgs, copyArtifactsArgs, deployArgs, konfluxArgs := pipelineBuildCommands(imageId, db, jbsConfig, buildId) + preBuildImageArgs, deployArgs, konfluxArgs := pipelineBuildCommands(imageId, db, jbsConfig, buildId) fmt.Printf("### Was using preBuildImageArgs %#v and konfluxArgs %#v ", preBuildImageArgs, konfluxArgs) gitScript := gitScript(db, recipe) @@ -165,15 +165,6 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi tlsVerify = "false" } - preprocessorArgs := []string{ - "maven-prepare", - "$(workspaces." + WorkspaceSource + ".path)/source", - } - if len(recipe.DisabledPlugins) > 0 { - for _, i := range recipe.DisabledPlugins { - preprocessorArgs = append(preprocessorArgs, "-dp "+i) - } - } var javaHome string if recipe.JavaVersion == "7" || recipe.JavaVersion == "8" { javaHome = "/lib/jvm/java-1." + recipe.JavaVersion + ".0" @@ -210,22 +201,11 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi } else if tool == "gradle" { // We always add Maven information (in InvocationBuilder) so add the relevant settings.xml buildToolSection = mavenSettings + "\n" + gradleBuild - preprocessorArgs = []string{ - "gradle-prepare", - "$(workspaces." + WorkspaceSource + ".path)/source", - } - if len(recipe.DisabledPlugins) > 0 { - for _, i := range recipe.DisabledPlugins { - preprocessorArgs = append(preprocessorArgs, "-dp "+i) - } - } } else if tool == "sbt" { buildToolSection = sbtBuild - preprocessorArgs[0] = "sbt-prepare" } else if tool == "ant" { // We always add Maven information (in InvocationBuilder) so add the relevant settings.xml buildToolSection = mavenSettings + "\n" + antBuild - preprocessorArgs[0] = "ant-prepare" } else { buildToolSection = "echo unknown build tool " + tool + " && exit 1" } @@ -258,7 +238,8 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi //we generate a docker file that can be used to reproduce this build //this is for diagnostic purposes, if you have a failing build it can be really hard to figure out how to fix it without this log.Info(fmt.Sprintf("Generating dockerfile with recipe build image %#v", recipe.Image)) - preprocessorScript := "#!/bin/sh\n/var/workdir/software/system-java/bin/java -jar /var/workdir/software/build-request-processor/quarkus-run.jar " + doSubstitution(strings.Join(preprocessorArgs, " "), paramValues, commitTime, buildRepos) + "\n" + //preprocessorScript := "#!/bin/sh\n/var/workdir/software/system-java/bin/java -jar /var/workdir/software/build-request-processor/quarkus-run.jar " + doSubstitution(strings.Join(preprocessorArgs, " "), paramValues, commitTime, buildRepos) + "\n" + preprocessorScript := "#!/bin/sh\n/var/workdir/software/system-java/bin/java -jar /var/workdir/software/build-request-processor/quarkus-run.jar " + recipe.Tool + "-prepare /var/workdir/workspace --recipe-image=" + recipe.Image + " --request-processor-image=" + buildRequestProcessorImage + " --disabled-plugins=" + strings.Join(recipe.DisabledPlugins, ",") buildScript := doSubstitution(build, paramValues, commitTime, buildRepos) envVars := extractEnvVar(toolEnv) cmdArgs := extractArrayParam(PipelineParamGoals, paramValues) @@ -296,41 +277,10 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi fmt.Printf("### Using recipe %#v with tool %#v and buildRequestImage %#v \n", recipe.Image, tool, buildRequestProcessorImage) - // Konflux Containerfile - kf := "FROM " + recipe.Image + - "\nUSER 0" + - "\nWORKDIR /var/workdir" + - "\nRUN mkdir -p /var/workdir/software/settings /original-content/marker" + - "\nARG CACHE_URL=\"\"" + - "\nENV CACHE_URL=$CACHE_URL" + - // TODO ### HACK : How to use SSL to avoid certificate problem with buildah task? - //"\nENV JBS_DISABLE_CACHE=true" + - "\nCOPY .jbs/run-build.sh /var/workdir" + - "\nCOPY . /var/workdir/workspace/source/" + - "\nRUN /var/workdir/run-build.sh" - // TODO: This is a bit of a hack but as Ant doesn't deploy and the previous implementation relied upon using the - // BuildRequestProcessorImage we need to modify the Containerfile. In future the ant-build.sh should probably - // encapsulate this. - if tool == "ant" { - kf = kf + - "\nFROM " + buildRequestProcessorImage + " AS build-request-processor" + - "\nUSER 0" + - "\nWORKDIR /var/workdir" + - "\nCOPY --from=0 /var/workdir/ /var/workdir/" + - // Don't think we need to mess with keystore as copy-artifacts is simply calling copy commands. - "\nRUN /opt/jboss/container/java/run/run-java.sh " + doSubstitution(strings.Join(copyArtifactsArgs, " "), []tektonpipeline.Param{}, commitTime, buildRepos) + - "\nFROM scratch" + - "\nCOPY --from=1 /var/workdir/workspace/artifacts /" - } else { - kf = kf + - "\nFROM scratch" + - "\nCOPY --from=0 /var/workdir/workspace/artifacts /" - } - pullPolicy := pullPolicy(buildRequestProcessorImage) limits, err := memoryLimits(jbsConfig, additionalMemory) if err != nil { - return nil, "", "", "", err + return nil, "", err } pipelineParams := []tektonpipeline.ParamSpec{ @@ -371,7 +321,7 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi Name: "url", Value: tektonpipeline.ParamValue{ Type: tektonpipeline.ParamTypeString, - StringVal: "https://raw.githubusercontent.com/rnc/jvm-build-service/KJB11/deploy/tasks/pre-build.yaml", + StringVal: "https://raw.githubusercontent.com/rnc/jvm-build-service/KJB11-2/deploy/tasks/pre-build.yaml", }, }, }, @@ -464,18 +414,25 @@ func createPipelineSpec(log logr.Logger, tool string, commitTime int64, jbsConfi StringVal: recipe.Image, }, }, + { + Name: "BUILD_TOOL", + Value: tektonpipeline.ParamValue{ + Type: tektonpipeline.ParamTypeString, + StringVal: tool, + }, + }, { Name: "BUILD_SCRIPT", Value: tektonpipeline.ParamValue{ Type: tektonpipeline.ParamTypeString, - StringVal: createKonfluxScripts(kf, konfluxScript), + StringVal: createKonfluxScripts(konfluxScript), }, }, { - Name: "PREPROCESSOR_ARGS", + Name: "BUILD_PLUGINS", Value: tektonpipeline.ParamValue{ Type: tektonpipeline.ParamTypeString, - StringVal: strings.Join(preprocessorArgs, " "), + StringVal: strings.Join(recipe.DisabledPlugins, ","), }, }, { @@ -659,7 +616,7 @@ use-archive oci:$URL@$AARCHIVE=$(workspaces.source.path)/artifacts`, orasOptions Value: value}) } - return ps, df, kf, konfluxScript, nil + return ps, df, nil } func secretVariables(jbsConfig *v1alpha1.JBSConfig) []v1.EnvVar { @@ -685,11 +642,8 @@ func secretVariables(jbsConfig *v1alpha1.JBSConfig) []v1.EnvVar { return secretVariables } -func createKonfluxScripts(containerfile string, konfluxScript string) string { +func createKonfluxScripts(konfluxScript string) string { ret := "mkdir -p $(workspaces." + WorkspaceSource + ".path)/source/.jbs\n" - ret += "tee $(workspaces." + WorkspaceSource + ".path)/source/.jbs/Containerfile <<'RHTAPEOF'\n" - ret += containerfile - ret += "\nRHTAPEOF\n" ret += "tee $(workspaces." + WorkspaceSource + ".path)/source/.jbs/run-build.sh <<'RHTAPEOF'\n" ret += konfluxScript ret += "\nRHTAPEOF\n" @@ -699,7 +653,7 @@ func createKonfluxScripts(containerfile string, konfluxScript string) string { func pullPolicy(buildRequestProcessorImage string) v1.PullPolicy { pullPolicy := v1.PullIfNotPresent - if strings.HasSuffix(buildRequestProcessorImage, ":dev") { + if strings.HasSuffix(buildRequestProcessorImage, ":dev") || strings.HasSuffix(buildRequestProcessorImage, ":latest") { pullPolicy = v1.PullAlways } return pullPolicy @@ -798,7 +752,7 @@ func gitScript(db *v1alpha1.DependencyBuild, recipe *v1alpha1.BuildRecipe) strin return gitArgs } -func pipelineBuildCommands(imageId string, db *v1alpha1.DependencyBuild, jbsConfig *v1alpha1.JBSConfig, buildId string) (string, []string, []string, []string) { +func pipelineBuildCommands(imageId string, db *v1alpha1.DependencyBuild, jbsConfig *v1alpha1.JBSConfig, buildId string) (string, []string, []string) { orasOptions := "" if jbsConfig.Annotations != nil && jbsConfig.Annotations[jbsconfig.TestRegistry] == "true" { @@ -814,12 +768,6 @@ export ORAS_OPTIONS="%s --image-spec=v1.0 --artifact-type application/vnd.oci.im create-archive --store %s $(results.%s.path)=$(workspaces.source.path)/source `, orasOptions, registryArgsWithDefaults(jbsConfig, preBuildImageTag), PipelineResultPreBuildImageDigest) - copyArtifactsArgs := []string{ - "copy-artifacts", - "--source-path=$(workspaces.source.path)/source", - "--deploy-path=$(workspaces.source.path)/artifacts", - } - deployArgs := []string{ "verify", "--path=$(workspaces.source.path)/artifacts", @@ -840,7 +788,7 @@ create-archive --store %s $(results.%s.path)=$(workspaces.source.path)/source konfluxArgs = append(konfluxArgs, gitArgs(jbsConfig, db)...) konfluxArgs = append(konfluxArgs, "--image-id="+imageId) - return preBuildImageArgs, copyArtifactsArgs, deployArgs, konfluxArgs + return preBuildImageArgs, deployArgs, konfluxArgs } // This effectively duplicates the defaults from DeployPreBuildImageCommand.java diff --git a/pkg/reconciler/dependencybuild/dependencybuild.go b/pkg/reconciler/dependencybuild/dependencybuild.go index 3d7a744ac..207565c9f 100644 --- a/pkg/reconciler/dependencybuild/dependencybuild.go +++ b/pkg/reconciler/dependencybuild/dependencybuild.go @@ -611,7 +611,7 @@ func (r *ReconcileDependencyBuild) handleStateBuilding(ctx context.Context, db * Pipeline: &v12.Duration{Duration: time.Hour * v1alpha1.DefaultTimeout}, Tasks: &v12.Duration{Duration: time.Hour * v1alpha1.DefaultTimeout}, } - pr.Spec.PipelineSpec, diagnosticContainerfile, _, _, err = createPipelineSpec(log, attempt.Recipe.Tool, db.Status.CommitTime, jbsConfig, &systemConfig, attempt.Recipe, db, paramValues, buildRequestProcessorImage, attempt.BuildId, preBuildImages) + pr.Spec.PipelineSpec, diagnosticContainerfile, err = createPipelineSpec(log, attempt.Recipe.Tool, db.Status.CommitTime, jbsConfig, &systemConfig, attempt.Recipe, db, paramValues, buildRequestProcessorImage, attempt.BuildId, preBuildImages) if err != nil { return reconcile.Result{}, err }