I am trying to pass some Repository Variables to a Java program via Maven command line.
Some of the repository variables are not getting replaced with their the respective values (i.e. the DB_PASS and USER_PASS).
What the application receives is $DB_PASS and $USER_PASS.
Whereas, the $CUCUMBER_TAG is passed as expected, but that is passed in from the BitBucket 'run pipeline' UI.
Note: The password values are marked as secure on the repository variables page.
I've read the documentation on this, but I'm obviously missing something. Can anyone advise me?
- step:
name: Run tests
script:
- echo "Starting tests"
- mvn test \
-Dtest-documents-path=$BITBUCKET_CLONE_DIR/test-documents \
-Chrome-documents-path=/test-documents \
-Dtest-env=pipeline-qa \
-Ddb_pass="$DB_PASS" \
-Duser_pass="$USER_PASS" \
-Dcucumber.filter.tags="$CUCUMBER_TAG"
G'day, @David Smiles
Welcome to the community!
I believe you have covered most aspects of using variables, but have you confirmed that the database username and password are valid? If you haven't already, and if security best practices allow, try using echo $variable
to display the value of the variables and verify if it's correct.
Regards,
Syahrul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.