• Home
  • Jenkins
  • Use Enviroment to get jenkins user credential

Use Enviroment to get jenkins user credential

linkaiyi
Follow

Use enviroment to get jenkins user credential

pipeline {
    agent any

    environment {
        USER_CREDENTIALS = credentials('USER_PASSWORD')
    }

    stages {
        stage('Run') {
            steps {
                sh "echo $USER_CREDENTIALS_USR"
                sh "echo $USER_CREDENTIALS_PSW"
            }
        }
    }
}
Object has 0 attachments

Was this article helpful?

This article is viewed 62 times!

Recent Viewed Articles

0 Comments

Leave a Comment

Support