From the course: Jenkins Essential Training
Unlock the full course today
Join today to access over 24,000 courses taught by industry experts.
Use secrets and credentials - Jenkins Tutorial
From the course: Jenkins Essential Training
Use secrets and credentials
- [Instructor] Sensitive information can be stored and managed directly in the Jenkins application. Jenkins uses the term credential to refer to sensitive information. A credential can be any data that we want to protect. So, you might hear the term secret or credential, but just know that they both refer to the same thing. Jenkins supports several types of credentials, including usernames and passwords, SSH keys, files, and text strings. Text strings are particularly useful for values like API keys or security tokens. Once we have credentials stored in Jenkins, we can use them in job configurations, including pipeline projects. Credentials can be accessed in several ways in a pipeline, but the two most common ways are the credentials function and the withCredentials build step. The credentials function is used to assign sensitive values to one or more environment variables. It takes the ID of a secret stored in Jenkins as…