Lab 06 - Build App Stage

Return to Workshop

Add Build App Stage to Pipeline Text File

Next, you will add the Build App Stage to your pipeline.

The git branch step will clone the openshift-tasks project with the git branch locally from your gogs server to your jenkins node. The jenkins node is leveraging the git jenkins plugin to communicate to gogs.

Please note that we are leveraging the eap-7 branch in our git project and not the master branch.

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.

  stages {
    stage('Build App') {
      steps {
        git branch: 'eap-7', url: 'http://gogs:3000/gogs/openshift-tasks.git'
        script {
            def pom = readMavenPom file: 'pom.xml'
            version = pom.version
          sh "${mvnCmd} install -DskipTests=true"

View Source Code in Gogs

View your gogs pod and click select the route (https://gogs...) to log into your gogs server.

Use the user name and password given to you by your instructor.

View the source of the openshift-tasks project in your gogs server.


Maven install will run through the Maven lifecycle and skip the tests. We will execute tests later in the pipeline.

Return to Workshop