So I have a .yml
file that contains "secure" variables of some of the encrypted values that I need to pass in to a mvn clean test
command.
I have something like
language: java
jdk:
- oraclejdk8
env:
global:
# Output of the command, 'travis encrypt MY_SECRET_KEY=super_secret'
- secure: Q0LjGCaS2LIB0z1XH1Qx4uAmGgG9mIlsZAtdSGbgd4XwRbWM5zPxaRtoe5YJCt4zeAOu9+TYxpqa5kv5EyizY0zSC8dEZQu6Ur7jfre2FaJ9O0sSq72Cn2cTVVXTEQi+CPnaK/pki/NpDSN6Zt82n7ypgxZOInFT+BtcXDK8ok0=
script: # Did I pass the secured variable correctly in the maven clean test command?
- mvn clean test -Denvironment=QA -DsecretKey=$MY_SECRET_KEY
I passed the variable name that I used in the original "Travis encryption" command. Please have a look above, is that how we are supposed to pass the encrypted global variable so that its decrypted value gets set in the maven clean test
command during a build?