diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cfd4c2d4..71173605 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,10 @@ jobs: build: strategy: + fail-fast: false matrix: platform: [ubuntu-latest, macos-latest, windows-latest] - jdk: [17, 21] + jdk: [17, 21, 25] runs-on: ${{ matrix.platform }} name: on ${{ matrix.platform }} with JDK ${{ matrix.jdk }} @@ -22,7 +23,7 @@ jobs: - name: Set up JDK ${{ matrix.jdk }} uses: actions/setup-java@v5 with: - distribution: 'corretto' + distribution: 'temurin' java-version: '${{ matrix.jdk }}' check-latest: true cache: 'maven' diff --git a/src/test/java/io/jenkins/plugins/forensics/reference/Java25ITest.java b/src/test/java/io/jenkins/plugins/forensics/reference/Java25ITest.java new file mode 100644 index 00000000..6522ab94 --- /dev/null +++ b/src/test/java/io/jenkins/plugins/forensics/reference/Java25ITest.java @@ -0,0 +1,33 @@ +package io.jenkins.plugins.forensics.reference; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.jvnet.hudson.test.JenkinsRule; +import org.jvnet.hudson.test.junit.jupiter.WithJenkins; + +import org.jenkinsci.plugins.workflow.cps.CpsFlowDefinition; +import org.jenkinsci.plugins.workflow.job.WorkflowJob; + +@WithJenkins +class Java25ITest { + private JenkinsRule jenkins; + + @BeforeEach + @SuppressWarnings("checkstyle:HiddenField") + public void setUp(final JenkinsRule jenkins) { + this.jenkins = jenkins; + } + + @Test + void shouldOverwriteReferenceBuild() throws Exception { + var reference = jenkins.createProject(WorkflowJob.class); + reference.setDefinition(new CpsFlowDefinition( + """ + node { + echo 'Hello Job'; + discoverReferenceBuild(); + } + """, true)); + jenkins.buildAndAssertSuccess(reference); + } +}