...
The file structure is typically as follow:
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 | ||||
---|---|---|---|---|
| ||||
# 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:
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
- First install the Artifactory plugins
- Setup the connection in the "Manage Jenkins/Configure System" section
- Create a generic repository on the Artifactory server
- Select the "Generic-Artifactory integration" in your Jenkins build
- select your artifactory server
Insert a spec that looks like
Code Block { "files": [ { "pattern": "*.zip", "target": "${PROJECT}/${Pipeline}/", "flat" : "false" } ] }
ElectricCloud Artifact Repository
...