Created
September 8, 2016 11:49
-
-
Save Alien2150/4b300102fae862e86fce08281c7f6b38 to your computer and use it in GitHub Desktop.
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
node("linux") { | |
sh 'printenv' | |
gitlabBuilds(builds: ["build", "test"]) { | |
/// See: https://jenkins.io/doc/pipeline/steps/gitlab-plugin/ | |
stage("Build") { | |
echo "Action type: ${env.gitlabActionType}" | |
if (env.gitlabActionType == "NOTE") { | |
echo "Someone made a comment on a merge-request" | |
} | |
echo "Will run the test on this commit ${env.gitlabMergeRequestLastCommit}" | |
echo "Might be a merge-request ${env.gitlabSourceBranch} into ${env.gitlabTargetBranch}" | |
gitlabCommitStatus("build") { | |
sh 'sbt compile' | |
} | |
} | |
stage("test") { | |
echo "I am testing the application" | |
gitlabCommitStatus("test") { | |
sh 'sbt test' | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment