@@ -11,7 +11,7 @@ metadata:
11
11
build.appstudio.redhat.com/build_type : docker
12
12
spec :
13
13
description : |-
14
- Takes a OCI archive and deploys the result
14
+ Takes a OCI archive and deploys the result and uploads log to Bifrost
15
15
params :
16
16
- name : IMAGE_URL
17
17
description : Reference to the OCI archive
39
39
description : Access token for OAuth.
40
40
type : string
41
41
default : " "
42
+ - name : BUILD_ID
43
+ type : string
44
+ - name : BIFROST_URL
45
+ description : bifrost url to upload log
46
+ type : string
42
47
- name : PNC_KONFLUX_TOOLING_IMAGE
43
48
description : Name of the tooling image.
44
49
type : string
80
85
value : $(params.IMAGE_DIGEST)
81
86
- name : IMAGE_URL
82
87
value : $(params.IMAGE_URL)
83
- - name : deploy
88
+ - name : uplaod-artifacts
84
89
image : $(params.PNC_KONFLUX_TOOLING_IMAGE)
85
90
securityContext :
86
91
runAsUser : 0
@@ -114,3 +119,39 @@ spec:
114
119
update-ca-trust
115
120
fi
116
121
/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