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
3bbff51c67
commit
7336187036
1 changed files with 3 additions and 0 deletions
3
Jenkinsfile
vendored
3
Jenkinsfile
vendored
|
@ -6,6 +6,8 @@ try {
|
||||||
def projectVersion=""
|
def projectVersion=""
|
||||||
def quayUser=env.QUAY_USER
|
def quayUser=env.QUAY_USER
|
||||||
def quayPassword=env.QUAY_PASSWORD
|
def quayPassword=env.QUAY_PASSWORD
|
||||||
|
def ocpUser=env.OCP_USER
|
||||||
|
def ocpPassword=env.OCP_PASSWORD
|
||||||
node("maven") {
|
node("maven") {
|
||||||
stage("Initialize") {
|
stage("Initialize") {
|
||||||
project = env.PROJECT_NAME
|
project = env.PROJECT_NAME
|
||||||
|
@ -43,6 +45,7 @@ try {
|
||||||
node('jenkins-slave-skopeo') {
|
node('jenkins-slave-skopeo') {
|
||||||
|
|
||||||
stage('Clair Container Vulnerability Scan') {
|
stage('Clair Container Vulnerability Scan') {
|
||||||
|
sh "oc login -u $ocpUser -p $ocpPassword --insecure-skip-tls-verify https://api.cluster-ottawa-57ac.ottawa-57ac.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/spring-petclinic:latest docker://quay.io/$quayUser/spring-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/spring-petclinic:latest docker://quay.io/$quayUser/spring-petclinic:latest"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue