Working now. The problem was with another property that was defined as
username/password credential and not secret text credential.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from
Also, if I will print all of process.env when running npm test via the
Jenkinsfile, I can see the Jenkins logs that the not-working value is
printed...
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop
Actually I think it does work... for the most part...
Working example:I created a "secret text" credential containing some
password value and I then put the credential's ID as the value for a Global
Variable called "myPassword".
In the Global Variables section there is a checkbox, "environment
The secret text being printed as *** is a feature, so credentials aren't
leaked in console logs. You cannot use Jenkins credentials during
application runtime. (ie: If you deploy a backend Node app to an app
server) You can however use Jenkins credentials to run npm scripts, such as
npm test,
I have done the following:
1. Create a "secret text" type credential
2. Put in the credential a password
3. Create a Global Variable, mySecret, with its value being the credential
ID
4. In the declarative pipeline:
stage ("E2E tests") {
environment {
mySecret =