Skip to content

Fixing Liquibase template for DB2 - #1703

Merged
twerthi merged 3 commits into
masterfrom
fix-liquibase-db2
Aug 14, 2026
Merged

Fixing Liquibase template for DB2#1703
twerthi merged 3 commits into
masterfrom
fix-liquibase-db2

Conversation

@twerthi

@twerthi twerthi commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Background

As of Liquibase 5.0, the Community version no longer includes database drivers and users have to manage it themselves. The original code path of this template had an entry for DB2, but fell through as it was relying on the embedded DB2 driver.

Results

The code has been updated to dynamically download the DB2 .jar driver when the Download driver box is checked in the template.

Before

Executions against DB2 would fail if the user was using the Community variant of the Liquibase product.

After

The code has been updated to download the DB2 .jar database driver file if the Download driver option is checked in the template.

Pre-requisites

  • Id should be a GUID that is not 00000000-0000-0000-0000-000000000000
    • NOTE If you are modifying an existing step template, please make sure that you do not modify the Id property (updating the Id will break the Library sync functionality in Octopus).
  • Version should be incremented, otherwise the integration with Octopus won't update the step template correctly
  • $Meta must have ExportedAt and OctopusVersion updated
  • Parameter names should not start with $
  • Step template parameter names (the ones declared in the JSON, not the script body) should be prefixed with a namespace so that they are less likely to clash with other user-defined variables in Octopus (see this issue). For example, use an abbreviated name of the step template or the category of the step template).
  • LastModifiedBy field must be present, and (optionally) updated with the correct author
  • The best practices documented here have been applied
  • If a new Category has been created:
    • An image with the name {categoryname}.png must be present under the step-templates/logos folder
    • The switch in the humanize function in gulpfile.babel.js must have a case statement corresponding to it

@github-actions

Copy link
Copy Markdown

Review this PR in Hyponome for a side-by-side diff of the step-template JSON and any embedded scripts.

@lrochette lrochette left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change line 651 of the script from:

# Use built-in driver

to

# Downlaad DB2 driver

but looks good besides that

@twerthi
twerthi merged commit 30d3967 into master Aug 14, 2026
2 checks passed
@twerthi
twerthi deleted the fix-liquibase-db2 branch August 14, 2026 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants