-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
154 changed files
with
29,133 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
node { | ||
def SOURCEDIR = pwd() | ||
try { | ||
stage("Clean up") { | ||
step([$class: 'WsCleanup']) | ||
} | ||
stage("Checkout Code") { | ||
checkout scm | ||
} | ||
stage("Test with Docker") { | ||
withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${env.BINDING_TEST_URL}"]) { | ||
sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source rosetteapi/docker-php" | ||
} | ||
} | ||
slack(true) | ||
} catch (e) { | ||
currentBuild.result = "FAILED" | ||
slack(false) | ||
throw e | ||
} | ||
} | ||
|
||
def slack(boolean success) { | ||
def color = success ? "#00FF00" : "#FF0000" | ||
def status = success ? "SUCCESSFUL" : "FAILED" | ||
def message = status + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" | ||
slackSend(color: color, channel: "#rapid", message: message) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
node { | ||
def SOURCEDIR = pwd() | ||
def TEST_CONTAINER = 'examples/php-test' | ||
def DOCKERFILE_DIR = './examples/docker' | ||
try { | ||
stage("Clean up") { | ||
step([$class: 'WsCleanup']) | ||
} | ||
stage("Checkout Code") { | ||
checkout scm | ||
} | ||
stage("Build Dockerfile") { | ||
dir ("${DOCKERFILE_DIR}") { | ||
docker.build("${TEST_CONTAINER}") | ||
} | ||
} | ||
stage("Run Examples") { | ||
withEnv(["API_KEY=${env.ROSETTE_API_KEY}", "ALT_URL=${env.BINDING_TEST_URL}"]) { | ||
sh "docker run --rm -e API_KEY=${API_KEY} -e ALT_URL=${ALT_URL} -v ${SOURCEDIR}:/source ${TEST_CONTAINER}" | ||
} | ||
} | ||
slack(true) | ||
} catch (e) { | ||
currentBuild.result = "FAILED" | ||
slack(false) | ||
throw e | ||
} | ||
} | ||
|
||
def slack(boolean success) { | ||
def color = success ? "#00FF00" : "#FF0000" | ||
def status = success ? "SUCCESSFUL" : "FAILED" | ||
def message = status + ": Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL})" | ||
slackSend(color: color, channel: "#rapid", message: message) | ||
} |
This file contains 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.