add secret text jenkins code example
Example: how to pass secret text in jenkins pipeline
node { withCredentials([string(credentialsId: 'my-secret', variable: 'SECRET')]) { //set SECRET with the credential content echo "My secret text is '${SECRET}'" }}