Versions Compared

Key

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

Here is a summary of the Upgrade DevOps pipeline along with a detailed description of each Stage, Job, and Task. In the example below Test_Legacy_CI is a Stage, Compliance_Test_WARN is a Job within that Stage, and the tasks within this Job are detailed in the page below. Different build tools employ different terminology, but Stage, Job and Task are commonly adopted.

This example uses a screenshot from Microsoft Azure DevOps (below), but the process is identical regardless of the build tool being used. You can use this description to create a MettleCI build pipeline using a build tool for which we do not currently provide a . pipeline template.

...

Select the pipeline stage to jump to its description:

...

#

Task

Command

Description

1

Download artefact

Build tool specific

Download the previously-created DSParams.diff file to the agent’s local directory.

2

Create project

mettleci datastage create-project (documentation)

Verify that the CI project exists (otherwise, create it).

3

Configure properties

mettleci properties config (documentation)

Replace variables in the DSParams file, any Parameter Sets files, and any user-define shell scripts (from repository path /datastage) with values defined in the var.ci properties file. Processed files are stored in a config directory created by this command in the current workspace on the agent.

This example operates on *.sh files in the 'datastage' base directory, the DSParams file, and all Parameter Sets

using values from the file 'var.ci' (as determined by the environmentId parameter)

// Substituted files are created in a new temporary build directory on your build agent host called 'config'

4

Upload config files

mettleci remote upload (documentation)

Upload the config directory containing files modified by the Configure Properties step and your repository’s filesystem directory from the build agent to your CI environment.

5

Execute deploy script

mettleci remote execute (documentation)

Execute your config/deploy.sh script (previously generated by the Configure properties task from your repository's datastage/deploy.sh file) on your CI environment. This user-supplied script performs solution-specific deployment processes required by the assets in the filesystem directory.

6

Deploy DataStage assets

mettleci datastage deploy (documentation)

Perform an incremental deployment of your DataStage assets to the CI project.

7

Cleanup

mettleci remote execute (documentation)

Execute the script config/cleanup.sh (previously generated by the Configure properties task from your repository's datastage/cleanup.sh file) in the CI environment. This script removes files which are no longer required from your build agent’s disk.

8

Check for results

Inline script

Detects and records (in a build pipeline variable) whether the Job compilation performed by the Deploy DataStage assets task produced an output jUnit JUnit .xml file. Note that the incremental deployment approach used by MettleCI may mean that a test output file would not be generated in the event that the deployment process does not detect any changes.

9

Publish compilation results

Build tool specific

If a jUnit JUnit .xml file was detected by the Check for results step then publish it to the build tool for use in test suite management.

...

#

Task

Command

Description

1

Checkout Compliance repository

Build tool specific

Make the Compliance repository (separate to the DataStage asset repository, where this pipeline definition is stored) accessible to the build agent.

2

Run Compliance Warnings

mettleci compliance test -ignore-test-failures (documentation)

Invokes MettleCI Compliance checks for changes jobs. Note that in this mode (including the -ignore-test-failures option) a failed Compliance check will not cause the entire build pipeline to fail.

3

Check for results

Build tool specific

Detects and records (in a build pipeline variable) whether the Compliance check performed by the Run Compliance task produced an output jUnit JUnit .xml file. Note that the incremental deployment approach used by MettleCI may mean that a test output file would not be generated in the event that the deployment process does not detect any changes.

4

Publish compliance results

Build tool specific

If a jUnit JUnit .xml file was detected by the Check for results step then publish it to the build tool for use in test suite management.

...

#

Task

Command

Description

1

Checkout Compliance repository

Build tool specific

Make the Compliance repository (separate to the DataStage asset repository, where this pipeline definition is stored) accessible to the build agent.

2

Run Compliance (CI FAIL)

mettleci compliance test (documentation)

Invoke MettleCI Compliance checks for changes jobs. Note that in this mode (omitting the -ignore-test-failures option) a failed Compliance check will cause the entire build pipeline to fail.

3

Check for results

Inline script

Detects and records (in a build pipeline variable) whether the Compliance check performed by the Run Compliance task produced an output jUnit JUnit .xml file. Note that the incremental deployment approach used by MettleCI may mean that a test output file would not be generated in the event that the deployment process does not detect any changes.

4

Publish compliance results

Build tool specific

If a jUnit JUnit .xml file was detected by the Check for results step then publish it to the build tool for use in test suite management.

...

#

Task

Command

Description

1

Upload config files

mettleci remote upload (documentation)

Upload the file datastage/cleanup_unittest.sh from the build agent to your CI environment.

2

Upload unit test specs

mettleci remote upload (documentation)

Upload your repository’s unittest directory from the build agent to your CI environment.

3

Configure properties

mettleci properties config (documentation)

Replace variables in the datastage/cleanup_unittest.sh file with values defined in the var.ci properties file and store the processed file in the config directory.

4

Create unit test report dir

mkdir unittest-reports

Create directory to receive unit test outputs.

5

Run Unit Tests

mettleci unittest test (documentation)

Invoke the Unit Tests defined in your unittest directory. Note that MettleCI will use its incremental detection functionality to only execute Unit Tests where either the Unit Test case or associated Job have changed.

6

Download unit test reports

mettleci remote download (documentation)

Download any jUnit JUnit .xml files produced by the Run Unit Tests task from your CI environment to the build agent.

7

Cleanup

mettleci remote execute (documentation)

Execute the script stored in the repository file config/cleanup_unittest.sh (previously generated by the Configure properties task) in the CI environment. This script removes unit test results, to ensure a clean environment for the next execution.

8

Check for results

Inline script

Detects and records (in a build pipeline variable) whether the Unit Test execution performed by the Run Unit Tests task produced an output jUnit JUnit .xml file. Note that the incremental deployment approach used by MettleCI may mean that a Unit Test output file would not be generated in the event that the deployment process does not detect any changes.

9

Publish compilation results

Build tool specific

If a jUnit JUnit .xml file was detected by the Check for results step then publish it to the build tool for use in test suite management

...

#

Task

Command

Description

1

Download artefact

Build tool specific

Download the previously-created DSParams.diff file to the agent’s local working directory.

2

Create project

mettleci datastage create-project (documentation)

Verify that the target CI project exists (otherwise, create it)

3

Fetch template DSParams

mettleci remote download (documentation)

Download the target DataStage environment’s template DSParams file (typically located at <install-directory>/IBM/InformationServer/Server/Template/DSParams) to the build agent’s working directory.

4

Create artefacts directory

Inline script

Verify that the build directory artefactsexists (otherwise, create it).

5

Fetch diff

Build tool specific

Fetch the previously-generated DSParams.diff into the build agent’s working directory.

6

Generate merged DSParams file

mettleci dsparams merge (documentation)

Replace variables in the DSParams template file with values defined in the DSParams.diff file.

7

Configure properties

mettleci properties config (documentation)

Replace variables in the DSParams file, any Parameter Sets files, and any user-define shell scripts (from repository paths /datastage or /filesystem) with values defined in the var.ci properties file. Processed files are stored in a newly-created config directory.

8

Upload config files

mettleci remote upload (documentation)

Upload the config directory containing files modified by the Configure Properties step and your repository’s filesystem directory from the build agent to your target CI environment.

9

Execute deploy script

mettleci remote execute (documentation)

Execute the script config/deploy.sh on your target CI environment. This user-supplied script performs solution-specific deployment processes required by the assets in the filesystem directory.

10

Deploy DataStage assets

mettleci datastage deploy (documentation)

Perform an incremental deployment of your DataStage assets to the target CI project.

11

Cleanup

mettleci remote execute (documentation)

Execute the cleanup.sh (previously generated by the Configure properties task) in the target CI environment. This script removes files which are no longer required from your build agent’s disk.

12

Check for results

Inline script

Detects and records (in a build pipeline variable) whether the Job compilation performed by the Deploy DataStage assets task produced an output jUnit JUnit .xml file. Note that the incremental deployment approach used by MettleCI may mean that a test output file would not be generated in the event that the deployment process does not detect any changes.

13

Publish compilation results

Build tool specific

If a jUnit JUnit .xml file was detected by the Check for results step then publish it to the build tool for use in test suite management.

...