Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 25 additions & 21 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,20 @@ def gitUtils = new GitUtilities()
def utils = new Utilities()
def bazel = new Bazel()

node {
gitUtils.initialize()
// Proxy does build work correctly with Hazelcast.
// Must use .bazelrc.jenkins
bazel.setVars('', '')
}

mainFlow(utils) {
if (utils.runStage('PRESUBMIT')) {
def success = true
utils.updatePullRequest('run')
try {
pullRequest(utils) {
node {
gitUtils.initialize()
// Proxy does build work correctly with Hazelcast.
// Must use .bazelrc.jenkins
bazel.setVars('', '')
}

if (utils.runStage('PRESUBMIT')) {
presubmit(gitUtils, bazel)
} catch (Exception e) {
success = false
throw e
} finally {
utils.updatePullRequest('verify', success)
}
}
if (utils.runStage('POSTSUBMIT')) {
buildNode(gitUtils) {
bazel.updateBazelRc()
sh 'script/release-binary'
if (utils.runStage('POSTSUBMIT')) {
postsubmit(gitUtils, bazel, utils)
}
}
}
Expand All @@ -59,3 +49,17 @@ def presubmit(gitUtils, bazel) {
}
}
}

def postsubmit(gitUtils, bazel, utils) {
buildNode(gitUtils) {
bazel.updateBazelRc()
stage('Push Binary') {
sh 'script/release-binary'
}
stage('Docker Push') {
def images = 'proxy,proxy_debug'
def tags = "${gitUtils.GIT_SHORT_SHA},\$(date +%Y-%m-%d-%H.%M.%S),latest"
utils.publishDockerImages(images, tags)
}
}
}