Question & Answer
Question
How do you integrate IBM UrbanCode Deploy with Jenkins CI (Continuous Integration)?
Cause
After running a build in your existing Jenkins CI infrastructure, you want to deploy your applications automatically to various environments using IBM UrbanCode Deploy.
Answer
UrbanCode Deploy offers a plug-in for Jenkins CI which enables you to publish the build result to UrbanCode Deploy and trigger an application process.
Note: This scenario covers only the Jenkins CI server and not the Hudson CI server.
Table of Contents:
Prerequisites:
- Jenkins server installed. For this example, it runs on
http://jenkins-server:8080/
- UrbanCode Deploy server. For this example, it runs on
https://udeploy-server:8444/
- An application called MyApp, in an environment called SIT (System Integration Test), a component called MyComponent associated with MyApp and an Application Process called Install.
You do not need to have a Jenkins Job configured, a Jenkins Workspace configured, or the Jenkins UrbanCode Deploy plug-in installed, as these will be created in the following steps.
Installation:
Install the Jenkins plug-in shipped with UrbanCode Deploy. You can get the file
ibm-ucdeploy-publisher.hpi
from one of these sources:Option 1:
IBM UrbanCode Deploy 6.0.1 download from Passport Avantage. Unpack the
UBCD_PLUG-INS_6.0.1_MP_EN.zip
fileOption 2:
Jenkins Plugin and click Download
- Open the website of your Jenkins server
- Click on Manage Jenkins
- Click on Manage Plugins
- Open the Advanced tab
- Click on Browse In the section Upload Plugin
- Select
ibm-ucdeploy-publisher.hpi
. Click Upload
- Restart your Jenkins server in order to see the new plug-in by using
http://jenkins-server:8080/safeRestart
- Verify that the plug-in is installed and enabled
Configuration:
- Click on the link Manage Jenkins
- Click on Configure System
- Add a profile for your UrbanCode Deploy server
For example, where - Profile Name is
udeploy-server
- IBM UrbanCode Deploy URL is
https://udeploy-server:8444/
- User name is
admin
- Password is
admin user password
- Click Test connection to verify the configuration and click Apply
- Configure the post-build actions for each job.
- Use a free-form Jenkins job called MyJob with default settings
- Pick the option Execute shell in the section Build
- Specify a simple zip command, such as:
zip ${WORKSPACE}/data.zip /uc/jenkins/source
Note:WORKSPACE
refers here to the Jenkins workspace location
- Select the task Publish artifacts to IBM UrbanCode Deploy in the section Post-build Actions
- Select the following options:
- Click Save
- Click on the button Build Now
RESULT: Resources are built in Jenkins.
A new component version is created for component MyComponent in UrbanCode Deploy.
The Jenkins UrbanCode Deploy plug-in triggers the application process Install in application MyApp on UrbanCode Deploy.
Known Problems:
The Jenkins UrbanCode Deploy plug-in requires at least version 1.2.12 of Log4J, but Jenkins ships version 1.2.9. This results in the exception below:
|
WORKAROUND:
- Open
jenkins.war
and navigate toMETA-INF
- Delete
JENKINS.SF
andJENKINS.RSA
- Open
MANIFEST.MF
and delete all of the lines that start withSHA1-Digest
- Place the new Log4j with version greater or equal to 1.2.12 (e.g. Log4J 1.2.17) jar in
WEB-INF/lib
- Update
MANIFEST.MF
to point to the new version
Additional troubleshooting:
In case of other problems, perform these steps:
- Get the Jenkins log file
- Get the list of Plug-ins from Jenkins
- Review the Build log file
- Verify that a Request Application Process got triggered for the Application MyApp
- Check if the Application Process ran successfully
- Check the UrbanCode Deploy log:
deployserver.out
- Provide all the above logs to IBM Client Support, if the issue persists
[{"Product":{"code":"SS4GSP","label":"IBM UrbanCode Deploy"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Integrations - IBM","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"6.0;6.0.1","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21664334