Lab 09 - Archive App

Return to Workshop

Add Archive Stage

Add Archive Stage Steps into your pipeline.

We leveraged the maven nexus plugin for this deployment. The mvn deploy step is the last step in the maven lifecycle. The built application is archived into the nexus repository. We can see it later once we run the pipeline.

The "-P nexus3" option activates the nexus3 profile defined in the configuration/cicd-settings-nexus3.xml

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('Archive App') {
      steps {
        sh "${mvnCmd} deploy -DskipTests=true -P nexus3"

Return to Workshop