Update Jenkinsfile

This commit is contained in:
Andrew Pitt 2019-12-19 16:42:53 -05:00 committed by GitHub
parent ff1094d76a
commit b76bea18a4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

14
Jenkinsfile vendored
View file

@ -4,6 +4,8 @@ try {
def gitSourceRef=env.GIT_SOURCE_REF
def project=""
def projectVersion=""
def quayUser=env.QUAY_USER
def quayPassword=env.QUAY_PASSWORD
node("maven") {
stage("Initialize") {
project = env.PROJECT_NAME
@ -40,13 +42,13 @@ try {
}
node('jenkins-slave-skopeo') {
stage('Inspect Image') {
sh """
set +x
skopeo inspect docker://docker.io/fedora
"""
stage('Clair Container Vulnerability Scan') {
steps {
sh "#oc login -u $ocuser -p $ocpass --insecure-skip-tls-verify https://$ocp 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/spring-petclinic:latest docker://quay.io/$quayUser/spring-petclinic:latest"
}
}
stage("Tag DEV") {
echo "Tag image to DEV"