Hi all,
I'm currently using a BitBucket pipeline to run a Maven / Java JUnit tests to exercise a REST API. This runs fine, but it requires a username and password which is currently written in a property file. I want to move the values from the property file and into some respository variables, but retaining the property files.
I've configured the respository variables and and I can access them in my pipleline script using $VARIABLE_NAME, etc.
However, I don't know if its possible, but can I also use the same repository variables in my property files which my Java program reads when starting?
For example, I have property file called database.properties with some configuration and inserted the respository variables like this:
database.server=${DATABASE_SERVER}
database.username=${DATABASE_USERNAME}
database.password=${DATABASE_PASSWORD}
somevalue=${VARIABLE_NAME}
When I run the pipleline, the variables are read fine in the bitbucket-pipeline.yml file, but when the program runs there are no values in the property file. Is there some additional processing of the properties file required?
Any help or advice is appreciated.
Kind regards,
David