Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

That step should look like:

Build Triggers

You can use this section to transform your manual job into a CI one by "building when a change is pushed to (insert favorite SCM here)"

Build Environment

Check "Delete workspace before build starts", repo is usually small so the cost of cloning it the whole project is negligible compare t to the benefit of a clean environment

Image Added

Build

This is where the real work is done for the deployer

Set up branches

this first step is necessary to match the local and upstream branches . We notices that without it, the deployer has trouble pushing back the files into the Git repo.




Code Block
languagebash
titleSet up branches
linenumberstrue
cd portal_ddb
echo "Current Directory: " `pwd` 
git branch --set-upstream-to=origin/master master
git status

cd ../portal_sql
echo "Current Directory: " `pwd` 
git branch --set-upstream-to=origin/2017-july 2017-july
git status

Packager

This is the step that calls the packager itself. A few explanations:

  • If the PATH is not set in the profile of the "jenkins user", set it up there.
  • Also point to PATH to the directory containing the DB client (Oracle in this case) so the backup and restore commands can be executed
  • cd in the Datical project directory
  • Invoke the groovyĀ deployPackager.groovy script with hammer
    • scm=true indicates to the Deployer that the files to package are to be found in a SCM. Additional configuration is done through the deployPackager.properties file in the DaticalDB project directory


Code Block
titlePackager
linenumberstrue
# specify path to "hammer" - Datical DB's CLI tool
# specify path to Oracle client
export PATH=$PATH:/opt/datical/DaticalDB/repl:/home/datical/app/datical/product/11.2.0/client_1/bin
export ORACLE_HOME=/home/datical/app/datical/product/11.2.0/client_1/
cd fpcms2_ddb
# invoke Datical DB's Deployment Packager
hammer groovy deployPackager.groovy pipeline=Pipeline1 labels="2017-july" scm=true



Post-build Actions

Create an artifact either in Jenkins, or an external Artifact Repository like ElectricCloud Artifact Repository, IBM CodeStation, ...

IBM uBuild

Atlassian Bamboo

...