Liferay Jenkins integration- Part3

In the past tutorials, we learn about Jenkins setup for liferay integration for basic build and custom ant scripts. In this tutorial, we will use custom build script to do build. besides this,  it also explains post build actions, configuring down stream job and copying artifacts etc.

Past tutorials:

  1.  Liferay Jenkins integration
  2. Liferay ant custom build:  Download config.zip from this and extract files into jenkins workspace. The folder structure looks like below:

    Folder Structure

    Jenkins Build setup:

  1. Create a New Item with “Build” and select as a free style project
  2. Advanced configuration :Click on Advanced Project configuration and select “use custom workspace”. This property is to override jenkins workspace folder

    Custom Workspace

  3. SVN Configuration:Add project URL in Repository url and select Check-out Strategy as shown in below diagram

    SVN Image

  4. ANT build Target configuration:      In this provide build file and targets: build.xml file should be copied to “workspace” folder which we configuration above ANT Configuration
  5.  Post Build actions: In post build actions, we will configure Mail Communication about build status, copy Artifacts and Downstream build project . Build Other project enables another job “Dev Deploy” to deploy build into DEV environment.

    Post Build Actions

  6. After build, Jenkins workspace will looks like below: Post Workspace
  7.  Deploying to multiple environments: This requires Build Pipeline plugin to configure deployment to multiple projects. Create “Build Pipeline View”. I have already configured “Dev Deploy, Test Deploy…etc”. we will see in next tutorial above deployment. In Deployment, you need to carryout the below things to happen:
    1. Configure SSH plugin
    2. Adjust the build by loading corresponding environmental files
    3. Copy Artifacts over the SSH with “project_{build number}
    4. invoke shell script remotely.
  8. With Build Pipeline view, It will look like below

Leave a Comment

Your email address will not be published. Required fields are marked *