Hi I would like to suppress some sensetive information displayed in the logs please help me do that.
CODE::
pipeline {
parameters {
string(defaultValue: '', description: '', name: 'pki_client_cacert_password', trim: true)
string(defaultValue: '', description: '', name: 'db_url', trim: true)
}
stages {
stage('DeployToDev') {
steps {
script{
env.artifacts = sh(
returnStdout: true,
script: "/var/lib/jenkins/python_jobs/venv/bin/python3 /var/lib/jenkins/python_jobs/encrypter_creds.py --db_url=${env.db_url} --pki_client_cacert_password='${env.pki_client_cacert_password}'"
)
}
}
}
}
}
OUTPUT::
+ /var/lib/jenkins/python_jobs/venv/bin/python3 /var/lib/jenkins/python_jobs/encrypter_creds.py --db_url=<hide this from jenkins logs> '--pki_client_cacert_password=<hide this from jenkins logs>'