mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-21 23:05:50 +00:00
Update Jenkinsfile
This commit is contained in:
parent
e7230591c8
commit
37d87f1c01
1 changed files with 6 additions and 4 deletions
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
|
@ -4,17 +4,19 @@ try {
|
||||||
def gitSourceRef=env.GIT_SOURCE_REF
|
def gitSourceRef=env.GIT_SOURCE_REF
|
||||||
def project=""
|
def project=""
|
||||||
def projectVersion=""
|
def projectVersion=""
|
||||||
def quayUser=env.QUAY_USER
|
|
||||||
def quayPassword=env.QUAY_PASS
|
|
||||||
def ocpUser=env.OCP_USER
|
|
||||||
def ocpPassword=env.OCP_PASS
|
|
||||||
|
|
||||||
node('jenkins-slave-skopeo') {
|
node('jenkins-slave-skopeo') {
|
||||||
|
|
||||||
|
def quayUser=env.QUAY_USER
|
||||||
|
def quayPassword=env.QUAY_PASS
|
||||||
|
def ocpUser=env.OCP_USER
|
||||||
|
def ocpPassword=env.OCP_PASS
|
||||||
|
|
||||||
stage('Clair Container Vulnerability Scan') {
|
stage('Clair Container Vulnerability Scan') {
|
||||||
echo "Printing ocp and quay users:"
|
echo "Printing ocp and quay users:"
|
||||||
echo "OCP: ${ocpUser}"
|
echo "OCP: ${ocpUser}"
|
||||||
echo "Quay: ${quayUser}"
|
echo "Quay: ${quayUser}"
|
||||||
|
echo "Git repo: ${gitSourceUrl}"
|
||||||
|
|
||||||
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 "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"
|
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"
|
||||||
|
|
Loading…
Reference in a new issue