I have been trying to store the username environment variable name and password as value.
I’m fetching username and password from credential manager. Below is the script which I tired to work with but it didn’t work.
environment{
My_CRED=credentials('MY_CREDENTIALS')
}
but this stores the environment variable in below form.
My_CRED_USR= MYUSERNAME
My_CRED_PSW=****
but I wanted to store environment variable in the form of
MYUSERNAME=****
Please help me with script.