...
Add two more variables to your CI/CD system. These variables should be stored in your CI/CD system in the same way as other sensitive credentials (e.g. in. a secrets store, etc.)
Expose those two new variables in a manner that enables them to be referenced within your pipeline.
Update the commands from the Remote Namespace to use those environment variables.
...
Add Jenkins credentials (as Secret Text, like our other credentials) for each SSH in use:
the path (on the Jenkins Agent) of the SSH key file. Note that there is a reference to the associated public key in the
.ssh/authorized_keys
file on the associated DataStage Engine host)the passphrase, if one is being used
Add environment variables to relevant agents, that refer to the SSH credentials in the same manner as the example pipelines already do with IIS and MCI passwords, eg:
SSHKEYPATH
for the path of the SSH key fileSSHKEYPHRASE
for the SSH ket passphrase, if used
In the JenkinsFile, add calls for
SSHKEYPATH
andSSHKEYPHRASE
towithCredentials
calls for:the stage titled
"Create DSParams Diff Artifact"
, where theremote download
command fetches the template DSPARAMS file from the source DataStage instanceall stages that reference
mci_deploy
ormci_unittest
For example:Code Block withCredentials([ string(credentialsId: "${env.IISPASSWORD}", variable: 'IISPASSWORD'), string(credentialsId: "${env.MCIPASSWORD}", variable: 'MCIPASSWORD'), string(credentialsId: "${env.SSHKEYPATH}", variable: 'SSHKEYPATH'), string(credentialsId: "${env.SSHKEYPHRASE}", variable: 'SSHKEYPHRASE') ]) { <commands here> }
...