@@ -11,30 +11,20 @@ def gitUtils = new GitUtilities()
11
11
def utils = new Utilities ()
12
12
def bazel = new Bazel ()
13
13
14
- node {
15
- gitUtils. initialize()
16
- // Proxy does build work correctly with Hazelcast.
17
- // Must use .bazelrc.jenkins
18
- bazel. setVars(' ' , ' ' )
19
- }
20
-
21
14
mainFlow(utils) {
22
- if (utils. runStage(' PRESUBMIT' )) {
23
- def success = true
24
- utils. updatePullRequest(' run' )
25
- try {
15
+ pullRequest(utils) {
16
+ node {
17
+ gitUtils. initialize()
18
+ // Proxy does build work correctly with Hazelcast.
19
+ // Must use .bazelrc.jenkins
20
+ bazel. setVars(' ' , ' ' )
21
+ }
22
+
23
+ if (utils. runStage(' PRESUBMIT' )) {
26
24
presubmit(gitUtils, bazel)
27
- } catch (Exception e) {
28
- success = false
29
- throw e
30
- } finally {
31
- utils. updatePullRequest(' verify' , success)
32
25
}
33
- }
34
- if (utils. runStage(' POSTSUBMIT' )) {
35
- buildNode(gitUtils) {
36
- bazel. updateBazelRc()
37
- sh ' script/release-binary'
26
+ if (utils. runStage(' POSTSUBMIT' )) {
27
+ postsubmit(gitUtils, bazel, utils)
38
28
}
39
29
}
40
30
}
@@ -59,3 +49,17 @@ def presubmit(gitUtils, bazel) {
59
49
}
60
50
}
61
51
}
52
+
53
+ def postsubmit (gitUtils , bazel , utils ) {
54
+ buildNode(gitUtils) {
55
+ bazel. updateBazelRc()
56
+ stage(' Push Binary' ) {
57
+ sh ' script/release-binary'
58
+ }
59
+ stage(' Docker Push' ) {
60
+ def images = ' proxy,proxy_debug'
61
+ def tags = " ${ gitUtils.GIT_SHORT_SHA} ,\$ (date +%Y-%m-%d-%H.%M.%S),latest"
62
+ utils. publishDockerImages(images, tags)
63
+ }
64
+ }
65
+ }
0 commit comments