Update Jenkinsfile

This commit is contained in:
Andrew Pitt 2019-12-20 11:46:42 -05:00 committed by GitHub
parent ccb7dbc607
commit e7230591c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

8
Jenkinsfile vendored
View file

@ -5,13 +5,17 @@ try {
def project=""
def projectVersion=""
def quayUser=env.QUAY_USER
def quayPassword=env.QUAY_PASSWORD
def quayPassword=env.QUAY_PASS
def ocpUser=env.OCP_USER
def ocpPassword=env.OCP_PASSWORD
def ocpPassword=env.OCP_PASS
node('jenkins-slave-skopeo') {
stage('Clair Container Vulnerability Scan') {
echo "Printing ocp and quay users:"
echo "OCP: ${ocpUser}"
echo "Quay: ${quayUser}"
sh "oc login -u $ocpUser -p $ocpPassword --insecure-skip-tls-verify https://api.cluster-ottawa-7b89.ottawa-7b89.example.opentlc.com:6443 2>&1"
sh 'skopeo --debug copy --src-creds="$(oc whoami)":"$(oc whoami -t)" --src-tls-verify=false --dest-tls-verify=false' + " --dest-creds=$quayUser:$quayPassword docker://docker-registry.default.svc:5000/cicd/petclinic:latest docker://quay.io/$quayUser/petclinic:latest"
}