Interview Prep/CI/CD/Jenkins Credentials, Plugins and Controller Issues

Credentials binding fails: `Bad substitution` or `$PASSWORD: unbound variable`.

BeginnerTroubleshootingJenkins Credentials, Plugins and Controller Issues
Answer

Likely causes → Variable names mismatched between withCredentials and the script; wrong quote type; running sh using /bin/sh with Bash-only syntax.

Diagnose → Read the binding names and the script.

Fix → Align names, use single quotes, add #!/bin/bash where bash features are used.

Prevent → Standardise variable names in library steps.

All CI/CD questions

More on Jenkins Credentials, Plugins and Controller Issues