Jenkins · Steps and credentials

Bind credentials in environment

Expose a username and password credential as environment variables.

environment {
  REGISTRY = credentials('docker-registry')   // sets REGISTRY_USR and REGISTRY_PSW
}

Official Jenkins documentation

More steps and credentials commands

All steps and credentials commands · Jenkins cheatsheet

Was this page helpful?