Hello

I am sorry if this is not right group to post this question, but I was not 
able to find more suitable group.

I have multibranch pipeline Jenkins project and in my Jenkins file (see 
below) I create Docker image and deploy it into Nexus repository.

Now I would like to use Jenkins OpenShift Pipeline Plugin inside my Jenkins 
file, to deploy this Docker image into OpenShift 3.11.
I found many examples of OpenShift Pipeline Plugin usage, but none of them 
takes path to the Docker image and deploys it into OpenShift 3.11.

I am complete beginner with Jenkins pipelines so please correct me if I am 
doing something conceptually wrong or guide me into the right direction.

Jenkins file:

stage ('Deployment Stage') {
  steps {
    withMaven(maven : 'apache-maven-3.6.3') {
      sh 'mvn deploy'
    }
  }
}
stage('Building image') {
  steps {
    script {
      dockerImage = docker.build DOCKER_REGISTRY + "/" + CONTAINER_NAME + 
":$POM_VERSION"
    }
  }
}
stage('Deploy Image') {
  steps {
    script {
      docker.withRegistry( "https://"; + DOCKER_REGISTRY, DOCKER_CREDENTIAL ) {
        dockerImage.push()
      }
    }
  }
}

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/3f638d8e-6484-455e-823a-aa71092d903d%40googlegroups.com.

Reply via email to