0

I am developing a jenkins declarative pipeline to automate the delivery of Spring Boot applications running on Openshift 3.2.

My Jenkins instance is external to Openshift and I am using openshift-pipeline-plugin to perform the build & deploy operations.

So far my pipeline looks like this:

pipeline {
  agent any
  stages {
    stage ('Deploy Dev') {
      steps {
        echo 'Building application'
        openshiftBuild(namespace: 'my-namespace', bldCfg: 'project', showBuildLogs: 'true')
        openshiftVerifyDeployment(namespace: 'my-namespace', depCfg: 'project')
      }
    }
  }
}

The build & deploy operations work fine, and the openshiftVerifyDeployment step actually verifies that a new pod is launched. The problem is that that verification stops there, it doesn't wait for the application to start and acknoledge that it is healthy.

Ideally I would like to verify that the application has started successfully as well. How can I check this?

codependent
  • 23,193
  • 31
  • 166
  • 308

1 Answers1

0

The problem was that the readinessProbe wasn't configured. After adding it, the openshiftVerifyDeployment step waits until the probe confirms that the pod is ready.

codependent
  • 23,193
  • 31
  • 166
  • 308