Skip to content

Commit

Permalink
Jenkinsfiles
Browse files Browse the repository at this point in the history
- updated to look for upstream ALT_URL
  • Loading branch information
Chris Park committed Oct 27, 2017
1 parent b5c0f52 commit 2167f4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ node {
checkout scm
}
stage("Test with Docker") {
withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${env.BINDING_TEST_URL}"]) {
echo "${env.ALT_URL}"
def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}"
withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) {
sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source rosetteapi/docker-nodejs"
}
}
Expand Down
4 changes: 3 additions & 1 deletion Jenkinsfile.examples
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ node {
}
}
stage("Run Examples") {
withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${env.BINDING_TEST_URL}"]) {
echo "${env.ALT_URL}"
def useUrl = ("${env.ALT_URL}" == "null") ? "${env.BINDING_TEST_URL}" : "${env.ALT_URL}"
withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${useUrl}"]) {
def examplesDir = "${SOURCEDIR}" + '/examples'
sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${examplesDir}:/source ${TEST_CONTAINER}"
}
Expand Down

0 comments on commit 2167f4c

Please sign in to comment.