I have one environmental variable 'password' which is added to settings of my travis repo. I need to add this to my travis(instead of my maven file in github) because it cannot be shared to public. Now, I need to use the password in my maven test execution.
without travis, I can pass variable to maven test file by executing
mvn -DargLine="-Dpassword=xxxxx" test
and in my java program, I can access the variable using
System.getProperty("password")
How can I achieve the same using travis if I need to trigger maven test from travis and pass the variable? I tried using System.getenv and System.getProperty. Both of them are not working.
You can encrypt your env variable with your puplic/private key in travis CI see http://docs.travis-ci.com/user/encryption-keys/.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments