[Asterisk-code-review] CI: Add "throttle" label and "skip_gate" capability (...asterisk[13])
George Joseph
asteriskteam at digium.com
Thu Aug 8 07:15:01 CDT 2019
George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/12701
Change subject: CI: Add "throttle" label and "skip_gate" capability
......................................................................
CI: Add "throttle" label and "skip_gate" capability
To make throttling by label fully active, the "throttle" option
has to be specified with a specific label.
You can now specify "skip_gate" in the Gerrit comments when you
do a +2 code review to tell Jenkins not to actually run the
gate. You'd do this if you plan to manually merge the change.
Change-Id: I4c0b1085acec4805f2ca207eebac50aad81f27e2
---
M tests/CI/gates.jenkinsfile
M tests/CI/periodics-daily.jenkinsfile
M tests/CI/ref_debug.jenkinsfile
M tests/CI/unittests.jenkinsfile
4 files changed, 15 insertions(+), 6 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/01/12701/1
diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index 359dbbe..b82e45c 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -20,6 +20,8 @@
pipeline {
options {
+ ansiColor('gnome-terminal')
+ throttle(['asterisk-gate'])
timestamps()
timeout(time: timeoutTime, unit: timeoutUnits)
}
@@ -62,14 +64,15 @@
stages {
stage ("->") {
- /*
- * Jenkins will try to automatically rebuild this job when
- * the jenkinsfile changes but since this job is dependent on
- * Gerrit, we really don't want to do anything in that case.
- */
when {
+ /*
+ * Jenkins will try to automatically rebuild this job when
+ * the jenkinsfile changes but since this job is dependent on
+ * Gerrit, we really don't want to do anything in that case.
+ */
not { environment name: 'GERRIT_CHANGE_NUMBER', value: '' }
- not { environment name: 'GERRIT_EVENT_ACCOUNT_NAME', value: 'Jenkins2' }
+ /* If "skip_gate" is in the comments, don't run the job */
+ not { expression { env.GERRIT_EVENT_COMMENT_TEXT ==~ /.*skip_gate.*/ } }
}
steps {
/* Here's where we switch to scripted pipeline */
diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile
index c91c5e5..24cd80b 100644
--- a/tests/CI/periodics-daily.jenkinsfile
+++ b/tests/CI/periodics-daily.jenkinsfile
@@ -20,6 +20,8 @@
pipeline {
options {
+ ansiColor('gnome-terminal')
+ throttle(['asterisk-daily'])
timestamps()
timeout(time: timeoutTime, unit: timeoutUnits)
}
diff --git a/tests/CI/ref_debug.jenkinsfile b/tests/CI/ref_debug.jenkinsfile
index 0d1e522..134d7ac 100644
--- a/tests/CI/ref_debug.jenkinsfile
+++ b/tests/CI/ref_debug.jenkinsfile
@@ -20,6 +20,8 @@
pipeline {
options {
+ ansiColor('gnome-terminal')
+ throttle(['asterisk-ref-debug'])
timestamps()
timeout(time: timeoutTime, unit: timeoutUnits)
}
diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile
index 97d18a8..23e759e 100644
--- a/tests/CI/unittests.jenkinsfile
+++ b/tests/CI/unittests.jenkinsfile
@@ -20,6 +20,8 @@
pipeline {
options {
+ ansiColor('gnome-terminal')
+ throttle(['asterisk-check'])
timestamps()
timeout(time: timeoutTime, unit: timeoutUnits)
}
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12701
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I4c0b1085acec4805f2ca207eebac50aad81f27e2
Gerrit-Change-Number: 12701
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190808/6641434f/attachment.html>
More information about the asterisk-code-review
mailing list