Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Jenkins Job Setup

Jenkins Job Setup

Overview

The DevOps Automation Accelerator Kit provides tools to generate Jenkins jobs that can be copied to the server.

Note:

See Starting Construction Guide (Prerequisites) if you don't have a copy of the DevOps Automation accelerator.

Configure and run the job generator

  1. Unzip the DevOps Automation Accelerator Kit into a local directory.
  2. Configure the following client-specific values in jenkins-jobs/config/global.properties.
    Property Description

    commerce.engine.scm.urlextensions.scm.urlcmclient.scm.urldevops.scm.url

    ep.aem.commerce.scm.url geometrixx.demo.scm.url

    The SCM URLs for the EP projects. Currently only Git repositories are supported, but it should be straightforward to modify the templates to support other SCM systems.

    ep.aem.commerce.scm.url and geometrixx.demo.scm.url are only required for EP-for-AMC-Fall-2014-SP2 release package.

    Note:

    if Jenkins is authenticating using an SSH key remember to use the SSH clone URL, otherwise use the HTTPS clone URL.

    scm.branch

    The branch to build.

    client.display.name

    Display name for the client project. It MUST NOT contain embedded spaces or other characters that are subject to URL encoding. Hyphens and underscores are safe.

    num.builds.to.keep The number of build logs to keep.
    num.build.artifacts.to.keep The number of build artifact versions to keep. This number should be fairly small to limit excessive disk space usage.
    email.recipient.list The list of recipients to be notified of build failures. Multiple recipients must be separated by spaces.
    jenkins.scm.credential.id Leave blank. Not currently used.
    deployment.properties.file The properties file in the deployment folder to be used to generate deployment jobs.
  3. Configure the following deployment specific values in jenkins-jobs/config/deployment/dev.properties:
    Property Description
    deploy.environment Identifies the environment to be deployed. The value must match a directory in devops/pusher-package/environments.
    deploy.environment.name The display name of the deploy environment. It MUST NOT contain embedded spaces or other characters that are subject to URL encoding. Hyphens and underscores are safe.
    deploy.environment.hostname The hostname or IP address of the deployer host. This is the server where the Pusher scripts are executed.
    deploy.environment.user The username to login to the deployer hosts.
  4. Run the Jenkins job generator from the command line:
    cd jenkins-jobs
    mvn clean package -P basic-jobs,deployment-jobs

Copy jobs to the server

  1. Login to the Jenkins master via SSH.
  2. Stop Jenkins
    sudo service jenkins stop 
  3. Copy the generated jobs from jenkins-jobs/target/jobs to /var/lib/jenkins/jobs on the server. If you do not have source code for ep-aem-commerce project, you do not need to copy the job for it.
  4. Change permissions on the jobs
    sudo chmod 777 /var/lib/jenkins/jobs/*
  5. Restart Jenkins.
    sudo service jenkins start

Activate the jobs

The jobs are created in an inactive state. Using the Jenkins control panel, activate the jobs and test them in the following order:

  1. Commerce Engine Build
  2. Extensions Build
  3. EP for AEM Commerce Build (if applicable)
  4. Geometrixx Demo Build (if applicable)
  5. CM Client Build
  6. Deployment Package
  7. Commerce Engine Tests
  8. Deploy to Dev Server