sts-sponsors team mailing list archive
-
sts-sponsors team
-
Mailing list archive
-
Message #06697
[Merge] ~maas-committers/maas-ci/+git/maas-ci-config:timeout-long-running-jobs into ~maas-committers/maas-ci/+git/maas-ci-config:master
Jack Lloyd-Walters has proposed merging ~maas-committers/maas-ci/+git/maas-ci-config:timeout-long-running-jobs into ~maas-committers/maas-ci/+git/maas-ci-config:master.
Commit message:
Add whole-job timeout options to jenkins pipeline
Requested reviews:
MAAS Committers (maas-committers)
For more details, see:
https://code.launchpad.net/~maas-committers/maas-ci/+git/maas-ci-config/+merge/440259
--
Your team MAAS Committers is requested to review the proposed merge of ~maas-committers/maas-ci/+git/maas-ci-config:timeout-long-running-jobs into ~maas-committers/maas-ci/+git/maas-ci-config:master.
diff --git a/jenkins/jobs/ansible_playbook.groovy b/jenkins/jobs/ansible_playbook.groovy
index 9e6fcbd..0129ef0 100644
--- a/jenkins/jobs/ansible_playbook.groovy
+++ b/jenkins/jobs/ansible_playbook.groovy
@@ -14,6 +14,9 @@ pipeline {
agent {
label 'ci-lab'
}
+ options {
+ timeout(time: params.JOB_TIMEOUT ? params.JOB_TIMEOUT : 2, unit: "HOURS")
+ }
stages {
stage('Checkout') {
steps {
diff --git a/jenkins/jobs/systemtests.yaml b/jenkins/jobs/systemtests.yaml
index a40cafe..dc80fb3 100644
--- a/jenkins/jobs/systemtests.yaml
+++ b/jenkins/jobs/systemtests.yaml
@@ -3,6 +3,11 @@
description: |
Run the MAAS system tests
project-type: pipeline
+ parameters:
+ - string:
+ name: JOB_TIMEOUT
+ description: Maximum time in hours this job is allowed to run.
+ default:
triggers:
- timed: '@daily'
dsl: |
@@ -10,6 +15,9 @@
agent {
label 'ci-lab'
}
+ options {
+ timeout(time: params.JOB_TIMEOUT ? params.JOB_TIMEOUT : 2, unit: "HOURS")
+ }
parameters {
string(name: 'GIT_REPO', defaultValue: 'https://git.launchpad.net/~maas-committers/maas-ci/+git/system-tests', description: 'Git repo to pull system tests from')
string(name: 'GIT_BRANCH', defaultValue: 'master', description: 'Branch in the repo to use')
diff --git a/jenkins/jobs/systemtests_config_generator.groovy b/jenkins/jobs/systemtests_config_generator.groovy
index 25113a4..acb56f5 100644
--- a/jenkins/jobs/systemtests_config_generator.groovy
+++ b/jenkins/jobs/systemtests_config_generator.groovy
@@ -3,6 +3,9 @@ pipeline {
agent {
label 'ci-lab'
}
+ options {
+ timeout(time: params.JOB_TIMEOUT ? params.JOB_TIMEOUT : 2, unit: "HOURS")
+ }
environment {
TOX_PARALLEL_NO_SPINNER = '1'
}
diff --git a/jenkins/jobs/systemtests_config_generator.yaml b/jenkins/jobs/systemtests_config_generator.yaml
index f8ee769..eab7db0 100644
--- a/jenkins/jobs/systemtests_config_generator.yaml
+++ b/jenkins/jobs/systemtests_config_generator.yaml
@@ -68,6 +68,10 @@
name: GEN_CONFIG_ARGS
default: ""
- string:
+ name: JOB_TIMEOUT
+ description: Maximum time in hours this job is allowed to run.
+ default:
+ - string:
description: Additional args to pytest
name: PYTEST_ARGS
default: --log-cli-level info
diff --git a/jenkins/jobs/systemtests_executor.groovy b/jenkins/jobs/systemtests_executor.groovy
index b5369df..dc5f663 100644
--- a/jenkins/jobs/systemtests_executor.groovy
+++ b/jenkins/jobs/systemtests_executor.groovy
@@ -2,6 +2,9 @@ pipeline {
agent {
label 'ci-lab'
}
+ options {
+ timeout(time: params.JOB_TIMEOUT ? params.JOB_TIMEOUT : 2, unit: "HOURS")
+ }
environment {
TOX_PARALLEL_NO_SPINNER = '1'
diff --git a/jenkins/jobs/systemtests_executor.yaml b/jenkins/jobs/systemtests_executor.yaml
index 87500bb..2016572 100644
--- a/jenkins/jobs/systemtests_executor.yaml
+++ b/jenkins/jobs/systemtests_executor.yaml
@@ -18,6 +18,10 @@
name: SYSTEMTESTS_GIT_BRANCH
default: master
- string:
+ name: JOB_TIMEOUT
+ description: Maximum time in hours this job is allowed to run.
+ default:
+ - string:
description: Additional args to pytest
name: PYTEST_ARGS
default: --log-cli-level info
diff --git a/jenkins/jobs/systemtests_snap.yaml b/jenkins/jobs/systemtests_snap.yaml
index 91eee2b..559c9a2 100644
--- a/jenkins/jobs/systemtests_snap.yaml
+++ b/jenkins/jobs/systemtests_snap.yaml
@@ -3,6 +3,11 @@
description: |
Run the MAAS system tests, installed from snap
project-type: pipeline
+ parameters:
+ - string:
+ name: JOB_TIMEOUT
+ description: Maximum time in hours this job is allowed to run.
+ default:
triggers:
- timed: '@daily'
dsl: |
@@ -10,6 +15,9 @@
agent {
label 'ci-lab'
}
+ options {
+ timeout(time: params.JOB_TIMEOUT ? params.JOB_TIMEOUT : 2, unit: "HOURS")
+ }
parameters {
string(name: 'GIT_REPO', defaultValue: 'https://git.launchpad.net/~maas-committers/maas-ci/+git/system-tests', description: 'Git repo to pull system tests from')
string(name: 'GIT_BRANCH', defaultValue: 'master', description: 'Branch in the repo to use')
diff --git a/jenkins/jobs/systemtests_v3.yaml b/jenkins/jobs/systemtests_v3.yaml
index 60e618f..ee3de89 100644
--- a/jenkins/jobs/systemtests_v3.yaml
+++ b/jenkins/jobs/systemtests_v3.yaml
@@ -3,6 +3,11 @@
description: |
Run the MAAS system tests
project-type: pipeline
+ parameters:
+ - string:
+ name: JOB_TIMEOUT
+ description: Maximum time in hours this job is allowed to run.
+ default:
triggers:
- timed: '@daily'
dsl: |
@@ -12,6 +17,9 @@
agent {
label 'ci-lab'
}
+ options {
+ timeout(time: params.JOB_TIMEOUT ? params.JOB_TIMEOUT : 2, unit: "HOURS")
+ }
parameters {
string(name: 'SYSTEMTESTS_GIT_REPO', defaultValue: 'https://git.launchpad.net/~maas-committers/maas-ci/+git/system-tests', description: 'Git repo to pull system tests from')
string(name: 'SYSTEMTESTS_GIT_BRANCH', defaultValue: 'master', description: 'Branch in the repo to use')
Follow ups