projects
/
osm
/
devops.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add Jenkinsfile for stage_2 devops build
[osm/devops.git]
/
jenkins
/
ci-pipelines
/
ci_stage_1.groovy
diff --git
a/jenkins/ci-pipelines/ci_stage_1.groovy
b/jenkins/ci-pipelines/ci_stage_1.groovy
index
251d36e
..
d74de59
100644
(file)
--- a/
jenkins/ci-pipelines/ci_stage_1.groovy
+++ b/
jenkins/ci-pipelines/ci_stage_1.groovy
@@
-36,18
+36,24
@@
node("${params.NODE}") {
}
stage('downstream') {
}
stage('downstream') {
- //
initially use stage_name as the event_type
- def stage_name =
GERRIT_EVENT_TYPE
+ //
default to stage_2 (patchset)
+ def stage_name =
"stage_2"
- switch(GERRIT_EVENT_TYPE) {
- case "change-merged":
- stage_name = "stage_2-merge"
- break
+ try {
+ switch(GERRIT_EVENT_TYPE) {
+ case "change-merged":
+ stage_name = "stage_2-merge"
+ break
- case "patchset-created":
- stage_name = "stage_2"
- break
+ case "patchset-created":
+ stage_name = "stage_2"
+ break
+ }
+ }
+ catch(caughtError) {
+ println("No gerrit event found")
}
}
+
do_stage_4 = false
if (params.DO_STAGE_4)
{
do_stage_4 = false
if (params.DO_STAGE_4)
{