From 74237ddd59feb0b6f69cd6570cec8af5abb0c260 Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Fri, 22 Sep 2023 11:13:40 -0600 Subject: [PATCH] Use Jenkinsfile from archetype (#1508) Use the Jenkinsfile from the plugin archetype in order to reduce differences throughout the Jenkins organization. The Jenkinsfile from the plugin archetype is extended to run tests in parallel in order to reduce the time and cost of tests. https://github.com/jenkinsci/archetypes/issues/650 describes the alternatives for Jenkinsfile configurations. --- Jenkinsfile | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a680d6eb64..4d423e8fbb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,16 +1,11 @@ -#!/usr/bin/env groovy - -/* `buildPlugin` step provided by: https://github.com/jenkins-infra/pipeline-library */ +/* + See the documentation for more options: + https://github.com/jenkins-infra/pipeline-library/ +*/ buildPlugin( - // Run a JVM per core in tests - forkCount: '1C', - // Container agents start faster and are easier to administer - useContainerAgent: true, - // Show failures on all configurations - failFast: false, - // Test Java 17 and 21 + forkCount: '1C', // Run a JVM per core in tests + useContainerAgent: true, // Set to `false` if you need to use Docker for containerized tests configurations: [ - [platform: 'linux', jdk: 21], // Linux first for coverage report on ci.jenkins.io + [platform: 'linux', jdk: 21], [platform: 'windows', jdk: 17], - ] -) +])