Lab 13 - Deploy Dev

Return to Workshop

Deploy Dev Stage

Enter the Deploy Dev Stage to your pipeline text file.

OpenShift deploys the application and it's deployment configuration to Dev as previously defined from the Create Dev Stage.


Append to Jenkins Pipeline Configuration

In Builds > Pipelines > tasks-pipeline > Actions > Edit

Append the text below to the bottom of the Jenkins Pipeline Configuration. Please make sure to append to the beginning of the next line.

    stage('Deploy DEV') {
      steps {
        script {
          openshift.withCluster() {
            openshift.withProject(env.DEV_PROJECT) {
              openshift.selector("dc", "tasks").rollout().latest();
            }
          }
        }
      }
    }

Test Your Pipeline

If you'd like to do a test of first pipeline stage, add the following brackets at the end of your Jenkinsfile. Make sure to append to the beginning of the last line.

  }
}

Save your Jenkinsfile.

Go back to Builds > Pipelines

Click Start Pipeline

Delete Brackets

Please delete the brackets you just added once testing is complete. We can add them later if you'd like to test your pipeline as you go along.

  }
}

Click Save

Return to Workshop