Interview Prep/Jenkins/Declarative pipeline syntax

What does `credentials('id')` produce for each credential type in `environment`?

IntermediateConceptDeclarative pipeline syntax
Answer
Credential type Variables created for X = credentials('id')
Secret text X = the secret
Username with password X = user:pass, X_USR, X_PSW
Secret file X = path to a temp file
SSH username with private key X = path to key file, X_USR (and X_PSW for passphrase)

All values are masked in the console log and the temp files are deleted when the block ends.

All Jenkins questions Roadmap: Jenkins

More on Declarative pipeline syntax