From 9865478662e590ebacce8fcd5144af083234830c Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Tue, 25 Oct 2022 13:24:41 -0400 Subject: [PATCH] Add timeout and throttle to the jenkins workflows (#231) * Add timeout and throttle to the jenkins workflows Signed-off-by: Peter Zhu * Add changelog Signed-off-by: Peter Zhu Signed-off-by: Peter Zhu --- CHANGELOG.md | 3 ++- jenkins/publish-snapshot.jenkinsfile | 12 ++++++++++++ jenkins/stage-maven-release.jenkinsfile | 12 ++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 90e65f8992..8eb5e987b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Update literature around changelog contributions in CONTRIBUTING.md ([#242](https://github.com/opensearch-project/opensearch-java/pull/242)) - Update tests to use JUnit's Assert ([#244](https://github.com/opensearch-project/opensearch-java/pull/244)) - Add support to parse sub-aggregations from filter/nested aggregations ([#234](https://github.com/opensearch-project/opensearch-java/pull/234)) +- Add timeout and throttle to the jenkins workflows ([#231](https://github.com/opensearch-project/opensearch-java/pull/231)) ### Deprecated @@ -23,4 +24,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) ### Security -[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/2.0...HEAD \ No newline at end of file +[Unreleased]: https://github.com/opensearch-project/opensearch-java/compare/2.0...HEAD diff --git a/jenkins/publish-snapshot.jenkinsfile b/jenkins/publish-snapshot.jenkinsfile index b5d77cb23f..73ffdce604 100644 --- a/jenkins/publish-snapshot.jenkinsfile +++ b/jenkins/publish-snapshot.jenkinsfile @@ -1,4 +1,16 @@ pipeline { + options { + timeout(time: 30, unit: 'MINUTES') + throttleJobProperty( + categories: [], + limitOneJobWithMatchingParams: false, + maxConcurrentPerNode: 0, + maxConcurrentTotal: 1, + paramsToUseForLimit: '', + throttleEnabled: true, + throttleOption: 'project', + ) + } agent { docker { label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host' diff --git a/jenkins/stage-maven-release.jenkinsfile b/jenkins/stage-maven-release.jenkinsfile index ae8f21f2cf..80969ce215 100644 --- a/jenkins/stage-maven-release.jenkinsfile +++ b/jenkins/stage-maven-release.jenkinsfile @@ -4,6 +4,18 @@ lib = library(identifier: 'jenkins@main', retriever: modernSCM([ ])) pipeline { + options { + timeout(time: 30, unit: 'MINUTES') + throttleJobProperty( + categories: [], + limitOneJobWithMatchingParams: false, + maxConcurrentPerNode: 0, + maxConcurrentTotal: 1, + paramsToUseForLimit: '', + throttleEnabled: true, + throttleOption: 'project', + ) + } agent { docker { label 'Jenkins-Agent-AL2-X64-C54xlarge-Docker-Host'