Last active
January 3, 2016 05:29
-
-
Save jhrcz/8416643 to your computer and use it in GitHub Desktop.
jenkins sbt plugin does not have a working option to expand environment variables given thorough plugin parameters in jenkins. sooooooo - there is an evil bash wrapper for doing this ;o)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# 1. move java to create place for weapper | |
# mv java java.bin | |
# 2. save this wrapper as 'java' | |
# 3. then use java as expected, wrapper just executes the moved original java binary | |
# /opt/etnpol-sun-java-1.7.0-envhack/bin/java | |
# 4. for passing sbt arguments use env injecting from file created with this build bash script | |
# echo "SBT_ARGS=\"jenkins-release release-version=$RELEASE_VERSION next-version=$NEXT_VERSION\"" > /tmp/some-tmp-file-blabla.tmp | |
# 5. in actions use | |
# clean $SBT_ARGS | |
# | |
set -x | |
eval exec $(dirname $0)/java.bin "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment