@@ -11,59 +11,27 @@ metadata:
1111 build.appstudio.redhat.com/build_type : docker
1212spec :
1313 description : |-
14- Sets up pre-build running the preprocessor, pushing the source and creating the OCI image.
14+ Sets up pre-build running the preprocessor creating the OCI image.
1515 params :
16- - name : IMAGE_URL
17- description : URL of the OCI image to use.
18- type : string
19- - name : NAME
20- description : Name of the pipeline run (i.e. unique dependency build name)
21- type : string
22- - name : GIT_IDENTITY
23- description : Git username. If empty, deploy-pre-build-source step will be skipped.
24- type : string
25- default : " "
26- - name : GIT_URL
27- description : String to determine whether we're using gitlab or github
28- type : string
29- default : " github"
30- - name : GIT_SSL_VERIFICATION
31- description : Whether to disable ssl verification
32- type : string
33- default : " false"
34- - name : GIT_REUSE_REPOSITORY
35- description : Whether to reuse existing git repository or create new one
36- type : string
37- default : " false"
38- - name : SCM_URL
39- description : Reference to the git repository
40- type : string
41- - name : SCM_HASH
42- description : Git hash
43- type : string
44- - name : RECIPE_IMAGE
45- description : The image from the build recipe to use
4616 - name : BUILD_TOOL
4717 description : The build tool to use (ant, gradle, maven, sbt).
4818 - name : BUILD_TOOL_VERSION
4919 description : The build tool version to use (e.g. 3.9.5)
50- - name : JAVA_VERSION
51- description : Java version to use (7, 8, 9, 11, 17, 21, 22, 23)
52- - name : BUILD_PLUGINS
53- description : Optional comma separated list of build plugins that should be disabled.
54- default : " "
5520 - name : BUILD_SCRIPT
5621 description : The build script to embed with the Containerfile
22+ - name : JAVA_VERSION
23+ description : Java version to use (7, 8, 9, 11, 17, 21, 22, 23)
24+ - name : IMAGE_URL
25+ description : URL of the OCI image to use.
26+ type : string
5727 - name : JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE
5828 description : Name of the processor image. Useful to override for development.
5929 type : string
60- default : " quay.io/ncross/hacbs-jvm-build-request-processor:latest "
61- # default: "quay.io/redhat-user-workloads/konflux-jbs-pnc-tenant/jvm- build-service/build-request-processor:latest"
30+ - name : RECIPE_IMAGE
31+ description : The image from the build recipe to use
6232 results :
6333 - name : PRE_BUILD_IMAGE_DIGEST
6434 description : Digest of the image just built
65- - name : GIT_ARCHIVE
66- description : Git archive information
6735 workspaces :
6836 - description : The git repo will be cloned onto the volume backing this Workspace.
6937 name : source
@@ -80,47 +48,20 @@ spec:
8048 requests :
8149 cpu : 10m
8250 memory : 512Mi
83- script : |
84- /opt/jboss/container/java/run/run-java.sh $(params.BUILD_TOOL)-prepare --java-version=$(params.JAVA_VERSION) --build-tool-version=$(params.BUILD_TOOL_VERSION) --recipe-image=$(params.RECIPE_IMAGE) --request-processor-image=$(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE) --disabled-plugins=$(params.BUILD_PLUGINS) $(workspaces.source.path)/source
51+ args :
52+ - prepare
53+ - --build-tool-version=$(params.BUILD_TOOL_VERSION)
54+ - --java-version=$(params.JAVA_VERSION)
55+ - --recipe-image=$(params.RECIPE_IMAGE)
56+ - --request-processor-image=$(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE)
57+ - --type=$(params.BUILD_TOOL)
58+ - $(workspaces.source.path)/source
8559 env :
8660 - name : BUILD_SCRIPT
8761 value : $(params.BUILD_SCRIPT)
88- # TODO: Look at making this optional until we know whether we need to store source
89- - name : create-pre-build-source
90- image : $(params.JVM_BUILD_SERVICE_REQPROCESSOR_IMAGE)
91- securityContext :
92- runAsUser : 0
93- computeResources :
94- limits :
95- cpu : 300m
96- memory : 512Mi
97- requests :
98- cpu : 10m
99- memory : 512Mi
100- env :
101- - name : GIT_DEPLOY_TOKEN
102- valueFrom :
103- secretKeyRef :
104- optional : true
105- name : jvm-build-git-repo-secrets
106- key : gitdeploytoken
107- args :
108- - deploy-pre-build-source
109- - --source-path=$(workspaces.source.path)/source
110- - --task-run-name=$(context.taskRun.name)
111- - --scm-uri=$(params.SCM_URL)
112- - --scm-commit=$(params.SCM_HASH)
113- - --image-id=$(params.NAME)
114- - --git-identity=$(params.GIT_IDENTITY)
115- - --git-url=$(params.GIT_URL)
116- - --git-disable-ssl-verification=$(params.GIT_SSL_VERIFICATION)
117- - --git-reuse-repository=$(params.GIT_REUSE_REPOSITORY)
11862 - name : create-pre-build-image
11963 image : quay.io/redhat-appstudio/build-trusted-artifacts:latest@sha256:52f1391e6f1c472fd10bb838f64fae2ed3320c636f536014978a5ddbdfc6b3af
12064 script : |
121- set -x
122- echo "IMAGE is $(params.IMAGE_URL)"
123- cat $HOME/.docker/config.json || true
12465 echo "Creating pre-build-image archive"
12566 create-archive --store $(params.IMAGE_URL) $(results.PRE_BUILD_IMAGE_DIGEST.path)=$(workspaces.source.path)/source
12667 env :
0 commit comments