Jenkins – Pipeline Credentials

 

Create "Credentials" with type "Secret text". Fill in the ID and add a secret description optional.

Add the following to Jenkinsfile:

pipeline {
    agent none
    environment {
        MY_PASSWORD = credentials('my-secret-password')
    }

After that, you can use the variable "MY_PASSWORD", without fear that it will be shown in clear text.

0 0 vote
Article Rating

Tagged: Tags

Подписаться
Уведомление о
guest
0 Comments
Inline Feedbacks
View all comments