This Shared Library hosts a Custom Step which is an example implementation of the CCMT step of a MettleCI Pipeline. It provides parameterised wrapper around the mettleci datastage ccmt command.
Here’s the pseudocode for the Shared Library:
def call( def PUBLISHCOMPILATIONRESULTS, def UPGRADEORACLEVARIANT = false, def UPGRADEDORACLEVERSION = "11" ) { def variantParams = "{CCMT parameters required when using Oracle}" try { mettleci datastage ccmt ${variantParams} # Run CCMT to Upgrade Stages if (PUBLISHCOMPILATIONRESULTS) { // Publish CCMT output as JUnit Test Results when successful junit testResults 'log/**/mettleci_compilation.xml' } } catch(e) { if (PUBLISHCOMPILATIONRESULTS) { // Publish CCMT output as JUnit Test Results in the event of an error junit testResults 'log/**/mettleci_compilation.xml' } throw e # Propagate error for downstream error handling } }
Note that this Custom Step makes used of Jenkins' JUnit plugin.