need to get the root CA outside of the sh block

This commit is contained in:
Hyatt 2022-01-27 12:32:30 -06:00
parent 770edbab66
commit c063bddce1

View File

@ -32,8 +32,9 @@ podTemplate (
stage ("Add Cert to Kaniko") {
container ("kaniko") {
def localRootCA = functions.getLocalRootCA()
sh """
printf '%s\\n' "${functions.getLocalRootCA}" >> /kaniko/ssl/certs/ca-certificates.crt
printf '%s\\n' "${localRootCA}" >> /kaniko/ssl/certs/ca-certificates.crt
cp "/kaniko/ssl/certs/ca-certificates.crt" "${workspace}/kaniko-chain.crt"
"""
}