@@ -11,7 +11,7 @@ metadata:
1111 build.appstudio.redhat.com/build_type : docker
1212spec :
1313 description : |-
14- Takes a OCI archive and deploys the result
14+ Takes a OCI archive and deploys the result and uploads log to Bifrost
1515 params :
1616 - name : IMAGE_URL
1717 description : Reference to the OCI archive
3939 description : Access token for OAuth.
4040 type : string
4141 default : " "
42+ - name : BUILD_ID
43+ type : string
44+ - name : BIFROST_URL
45+ description : bifrost url to upload log
46+ type : string
4247 - name : PNC_KONFLUX_TOOLING_IMAGE
4348 description : Name of the tooling image.
4449 type : string
8085 value : $(params.IMAGE_DIGEST)
8186 - name : IMAGE_URL
8287 value : $(params.IMAGE_URL)
83- - name : deploy
88+ - name : uplaod-artifacts
8489 image : $(params.PNC_KONFLUX_TOOLING_IMAGE)
8590 securityContext :
8691 runAsUser : 0
@@ -114,3 +119,39 @@ spec:
114119 update-ca-trust
115120 fi
116121 /opt/jboss/container/java/run/run-java.sh $@
122+ - name : upload-log
123+ image : $(params.PNC_KONFLUX_TOOLING_IMAGE)
124+ securityContext :
125+ runAsUser : 0
126+ computeResources :
127+ limits :
128+ cpu : 300m
129+ memory : 512Mi
130+ requests :
131+ cpu : 10m
132+ memory : 512Mi
133+ volumeMounts :
134+ - mountPath : /mnt/trusted-ca
135+ name : trusted-ca
136+ readOnly : true
137+ env :
138+ - name : ACCESS_TOKEN
139+ value : $(params.ACCESS_TOKEN)
140+ args :
141+ - upload-log
142+ - --file=/var/workdir/log/build.log
143+ - --bifrost-url=$(params.BIFROST_URL)
144+ - --process-context=$(params.BUILD_ID)
145+ - --process-context-variant=""
146+ - --tmp=false
147+ - --request-context=""
148+ script : |
149+ #!/bin/bash
150+ set -e
151+ ca_bundle=/mnt/trusted-ca/ca-bundle.crt
152+ if [ -f "$ca_bundle" ]; then
153+ echo "INFO: Using mounted CA bundle: $ca_bundle"
154+ cp -vf $ca_bundle /etc/pki/ca-trust/source/anchors
155+ update-ca-trust
156+ fi
157+ /opt/jboss/container/java/run/run-java.sh $@
0 commit comments