Versions Compared

Key

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

...

  1. Checkout the SQL code from the appropriate branch 
  2. Checkout the DaticalDB project from the main branch
  3. Run the deployer through the Command Line Interface (CLI) "hammer groovy deployPackager.groovy", this will includes:
  4. Create an artifact ( comprised of the DaticalDB project directory)
  5. After the artifact has been created, the process will be the same in each environment:
    1. download the artifact
    2. run the CLI to do a forecast
    3. run the CLI to execute the deployment itself


Checking your code into SCM

The file structure is typically as follow:

Image 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, sqlplus, sql, function, packagebody, package, procedure and finally data_dml. 

Git

For a complete understanding of Git please refer to the official documentation.

  1. create files in the correct subdirectories (you may have to create the subdirectory first) as required
  2. add the files to your upcoming commit with: "git add <filename> ..." or "git add ." to commit the whole current directory and its children.
  3. Commit the files you have added with :
    git commit -m "Commit message" 
    if the commit message contains some text between square bracket like "Create employee table [JIRA-1234]", a "label" will be automatically created by DaticalDB during the deployer phase. This allows you to add additional label for specific jira, feature, story, ... for a more granular deployment process
  4. if you need to insert some kind of orders to process you files (i.e. CREATE the table before the ALTER statement), you can split you git add and git commit as in
    1. git add createEmployeeTable.sql
    2. git commit -m "Create employee table"
    3. git add AlterEmployeeTable.sql
    4. git commit -m "Add a column to the employee table [JIRA-2345]"
  5. Push your changes to the git server so the packager (and your colleagues) can have access to the changes:
    1. git push 

TFS

Build Systems

Jenkins

IBM uBuild

...