You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I'm trying to set up CI with Bitbucket pipelines, using a custom Docker image. I need maven to run with an environment variable but I can't get the build script to read the value of this variable. The script is:
echo "'$USERNAME'" && mvn -Dusername="'$USERNAME'" -Dpassword=. package
But then instead of getting the value of the USERNAME variable echoed I get "'$USERNAME'". Same if I echo only $USERNAME or "$USERNAME". How can I fix this?
Looks like you have a few too many " & "'s in there.
I set my USERNAME environment variable to Atlassian.
With this pipeline
- echo $USERNAME
- echo '$USERNAME'
Note: when you type this in, it may try and suggest other environment variables. Don't worry and just keep typing the one you want. :)
I get the return
I hope that helps!