diff --git a/Jenkinsfile.release b/Jenkinsfile.release index d565bc87a..769767dc4 100644 --- a/Jenkinsfile.release +++ b/Jenkinsfile.release @@ -90,15 +90,14 @@ podTemplate(cloud: 'openshift', label: pod_label, yaml: pod) { """) } - def oscontainer_secret = "/run/kubernetes/secrets/oscontainer-registry/dockercfg"; - if (utils.pathExists(oscontainer_secret)) { stage('Sync oscontainer to quay.io') { - shwrap("""ociarchive=\$(cosa meta --image-path ostree) - case \${ociarchive} in - *ociarchive) skopeo copy --authfile=$oscontainer_secret oci-archive://\${ociarchive} docker://quay.io/cgwalters/fcos:${params.STREAM};; - *) echo Build not configured as oci ;; - esac""") - } + withCredentials([string(credentialsId: "oscontainer-secret", variable: "OSCONTAINER_SECRET")]) { + shwrap("""ociarchive=\$(cosa meta --image-path ostree) + case \${ociarchive} in + *ociarchive) skopeo copy --authfile=<($OSCONTAINER_SECRET) oci-archive://\${ociarchive} docker://quay.io/coreos-assembler/fcos:${params.STREAM};; + *) echo Build not configured as oci ;; + esac""") + } } for (basearch in params.ARCHES.split()) {