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"