Versions Compared

Key

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

...

The file structure is typically as follow:

Image RemovedImage Added

where:

  • portal_sql is the name of your repository, 
  • sql_code is the name of the directory where the packager will look for new/modified .sql files to package, this directory is reference in the deployPackager.properties in your DaticalDB project
  • the sub-directories represent the different kinds of SQL scripts to package. The process order for a commit is the following: ddl, sqlplusview, sqlfunction,function, procedure, package, packagebody, packagetrigger, procedure sql_direct and finally data_dml.  More details cane be found at Placing SQL Scripts in the SCM Repository.

metadata.properties

In each directory under the top level one (sql_code in this example), you can create configuration file named metadata, where you can pass some additional directives to the packager (like additional label or context). 

...

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 fpcms2portal_ddb

# invoke Datical DB's Deployment Packager
echo
echo === Invoke Deployment Packager
hammer groovy deployPackager.groovy pipeline=Pipeline1 labels="2017-july" scm=true

#
# Pipeline Status to refresh AuditDB
echo
echo ==== Refresh AuditDB ====
call hammer --pipeline=Pipeline1 status 

echo ==== Creating ddb-packager-${BUILD_NUMBER}.zip ====
zip -q -r ddb-packager-${BUILD_NUMBER}.zip *
mv *.zip ..

echo
echo =====FINISHED====



Post-build Actions

...

Log Access

In jenkins to be able to access the logs and reports, use the "archive the artifacts" action:

Image Added


Artifact Creation

Like for a CI build, you may want to create an artifact C in Jenkins, or an external Artifact Repository like ElectricCloud Artifact Repository, IBM CodeStation, ... that you will use later on for deployment.

IBM uBuild

Atlassian Bamboo

...

IBM CodeStation

JFrog Artifactory

Jenkins 

  1. First install the Artifactory plugins
    1. Setup the connection in the "Manage Jenkins/Configure System" section
  2. Create a generic repository on the Artifactory server
  3. Select the "Generic-Artifactory integration" in your Jenkins build
    1. select your artifactory server
    2. Insert a spec that looks like

      Code Block
      {
        "files": [
          {
            "pattern": "*.zip",
            "target": "${PROJECT}/${Pipeline}/",
            "flat" : "false"
          }
        ]
      }


ElectricCloud Artifact Repository

...