From 48173b169115b02d45077ddecb66e74979712296 Mon Sep 17 00:00:00 2001 From: Carl Taylor Date: Fri, 23 Oct 2026 16:00:16 +0100 Subject: [PATCH 1/2] Update CI Ant pipeline and jobs to support forks & SSH checkout - Add github_pr_sha and repoUser propertyDefinitions to manual and github triggers - Update Jenkinsfiles to use SSH clone URL with repoUser fork support and dir wrapper - Add ebcPriority parameter (default 90) and remove unused ebcPlan parameter - Increase step timeouts to 720 minutes (12 hours) - Remove coreStep and awaitOutputProperties from step definitions --- .../open-liberty-ci-ant-build.yml | 15 ++++++++ .../steps/OpenLibertyCIAntBuild.yml | 4 +-- .../steps/OpenLibertyCIAntDependencyBuild.yml | 5 ++- ...iberty-ci-ant-build-dependency.jenkinsfile | 34 ++++++++++--------- jenkins/open-liberty-ci-ant-build.jenkinsfile | 32 +++++++++-------- 5 files changed, 53 insertions(+), 37 deletions(-) diff --git a/.ci-orchestrator/open-liberty-ci-ant-build.yml b/.ci-orchestrator/open-liberty-ci-ant-build.yml index 592a69f..5cf6ead 100644 --- a/.ci-orchestrator/open-liberty-ci-ant-build.yml +++ b/.ci-orchestrator/open-liberty-ci-ant-build.yml @@ -9,6 +9,13 @@ triggers: description: "Runs an Open Liberty CI Ant Pipeline, building and testing the PR - Manual Trigger" triggerRank: 50 groups: ["WebsphereCommonComponents"] + propertyDefinitions: + - name: github_pr_sha + description: "The Full Commit Sha you wish to build" + required: true + - name: github_pr_user + description: "The GitHub user/fork owner (e.g. OpenLiberty or contributor)" + defaultValue: "OpenLiberty" - type: github triggerName: "GitHub" description: "Runs an Open Liberty CI Ant, building and testing the PR - Github Trigger" @@ -17,6 +24,14 @@ triggers: keyword: "!build" aliasKeywords: - "#build" + propertyDefinitions: + - name: github_pr_sha + defaultValue: "${github_pr_sha}" + description: "The Full Commit Sha you wish to build" + required: true + - name: github_pr_user + defaultValue: "${github_pr_user}" + description: "The GitHub user/fork owner" steps: - stepGroup: Build Open Liberty CI Ant dependency diff --git a/.ci-orchestrator/steps/OpenLibertyCIAntBuild.yml b/.ci-orchestrator/steps/OpenLibertyCIAntBuild.yml index 1d886d2..e68f8f7 100644 --- a/.ci-orchestrator/steps/OpenLibertyCIAntBuild.yml +++ b/.ci-orchestrator/steps/OpenLibertyCIAntBuild.yml @@ -1,10 +1,8 @@ - stepName: "OpenLibertyCIAntBuild" - coreStep: true workType: Jenkins projectName: OpenLibertyCIAntBuild - timeoutInMinutes: 30 + timeoutInMinutes: 720 dependsOn: - stepName: OpenLibertyCIAntDependencyBuild - awaitOutputProperties: true properties: jenkinsServiceName: "websphere-extra-jenkins" diff --git a/.ci-orchestrator/steps/OpenLibertyCIAntDependencyBuild.yml b/.ci-orchestrator/steps/OpenLibertyCIAntDependencyBuild.yml index 6631fc4..a923125 100644 --- a/.ci-orchestrator/steps/OpenLibertyCIAntDependencyBuild.yml +++ b/.ci-orchestrator/steps/OpenLibertyCIAntDependencyBuild.yml @@ -1,7 +1,6 @@ - stepName: "OpenLibertyCIAntDependencyBuild" - coreStep: true workType: Jenkins projectName: OpenLibertyCIAntDependencyBuild - timeoutInMinutes: 30 + timeoutInMinutes: 720 properties: - jenkinsServiceName: "websphere-extra-jenkins" \ No newline at end of file + jenkinsServiceName: "websphere-extra-jenkins" diff --git a/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile b/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile index 89eae84..d61f8e2 100644 --- a/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile +++ b/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile @@ -1,9 +1,10 @@ properties([ parameters([ - string(name: 'executionId', defaultValue: UUID.randomUUID().toString(), description: 'Unique execution id.'), - string(name: 'ebcPlan', defaultValue: 'See Shortlist', description: 'EBC plan to use when provisioning a Jenkins node (ignored when shortlist is supplied).'), - string(name: 'ebcShortlist', defaultValue: 'jenkins-child.yml', description: 'Overrides the ebcPlan. This controls the EBC shortlist to use when provisioning a Jenkins node.'), - string(name: 'github_pr_sha', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), + string(name: 'executionId', defaultValue: UUID.randomUUID().toString(), description: 'Unique execution id.'), + string(name: 'ebcShortlist', defaultValue: 'jenkins-child.yml', description: 'Overrides the ebcPlan. This controls the EBC shortlist to use when provisioning a Jenkins node.'), + string(name: 'ebcPriority', defaultValue: '90', description: 'Priority of the build execution on EBC.'), + string(name: 'repoUser', defaultValue: 'OpenLiberty', description: 'GitHub user or org holding the repository/fork.'), + string(name: 'github_pr_sha', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), string(name: 'ecosystemTracking', defaultValue: '"productArea":"Liberty"', description: 'Tracking Map as string often containing information about what CI Orchestrator pipeline.') ]) ]) @@ -16,23 +17,24 @@ timestamps { try { onEBC( demandId: params.executionId, - ebcPlan: params.ebcPlan, ebcShortlist: params.ebcShortlist, + priority: params.ebcPriority, autoCompleteAfterXHours: 24) { buildName params.executionId stage("Running Job") { reportActivity(name: "Build Open Liberty CI Ant dependency", executionId: params.executionId) { - sh """ - git init ci.ant - cd ci.ant - git remote add origin https://github.com/OpenLiberty/ci.ant.git - git fetch --depth 1 origin ${params.github_pr_sha} - git checkout --detach FETCH_HEAD - """ - withEnv([ - "executionId=${params.executionId}" - ]) { - sh "ci.ant/scripts/buildDependency.sh" + dir('ci.ant') { + sh """ + git init + git remote add origin git@github.com:${params.repoUser}/ci.ant.git + git fetch --depth 1 origin ${params.github_pr_sha} + git checkout --detach FETCH_HEAD + """ + withEnv([ + "executionId=${params.executionId}" + ]) { + sh "./scripts/buildDependency.sh" + } } } } diff --git a/jenkins/open-liberty-ci-ant-build.jenkinsfile b/jenkins/open-liberty-ci-ant-build.jenkinsfile index 4368f61..bdf2296 100644 --- a/jenkins/open-liberty-ci-ant-build.jenkinsfile +++ b/jenkins/open-liberty-ci-ant-build.jenkinsfile @@ -1,9 +1,10 @@ properties([ parameters([ string(name: 'executionId', defaultValue: UUID.randomUUID().toString(), description: 'Unique execution id.'), - string(name: 'ebcPlan', defaultValue: 'See Shortlist', description: 'EBC plan to use when provisioning a Jenkins node (ignored when shortlist is supplied).'), - string(name: 'ebcShortlist', defaultValue: 'jenkins-child.yml', description: 'Overrides the ebcPlan. This controls the EBC shortlist to use when provisioning a Jenkins node.'), - string(name: 'github_pr_sha', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), + string(name: 'ebcShortlist', defaultValue: 'jenkins-child.yml', description: 'Overrides the ebcPlan. This controls the EBC shortlist to use when provisioning a Jenkins node.'), + string(name: 'ebcPriority', defaultValue: '90', description: 'Priority of the build execution on EBC.'), + string(name: 'repoUser', defaultValue: 'OpenLiberty', description: 'GitHub user or org holding the repository/fork.'), + string(name: 'github_pr_sha', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), string(name: 'ecosystemTracking', defaultValue: '"productArea":"Liberty"', description: 'Tracking Map as string often containing information about what CI Orchestrator pipeline.') ]) ]) @@ -16,23 +17,24 @@ timestamps { try { onEBC( demandId: params.executionId, - ebcPlan: params.ebcPlan, ebcShortlist: params.ebcShortlist, + priority: params.ebcPriority, autoCompleteAfterXHours: 24) { buildName params.executionId stage("Running Job") { reportActivity(name: "Build Open Liberty CI Ant", executionId: params.executionId) { - sh """ - git init ci.ant - cd ci.ant - git remote add origin https://github.com/OpenLiberty/ci.ant.git - git fetch --depth 1 origin ${params.github_pr_sha} - git checkout --detach FETCH_HEAD - """ - withEnv([ - "executionId=${params.executionId}" - ]) { - sh "ci.ant/scripts/build.sh" + dir('ci.ant') { + sh """ + git init + git remote add origin git@github.com:${params.repoUser}/ci.ant.git + git fetch --depth 1 origin ${params.github_pr_sha} + git checkout --detach FETCH_HEAD + """ + withEnv([ + "executionId=${params.executionId}" + ]) { + sh "./scripts/build.sh" + } } } } From 28da6f8b25a26468db60fb74eb3a112407831946 Mon Sep 17 00:00:00 2001 From: Carl Taylor Date: Mon, 26 Oct 2026 10:50:06 +0000 Subject: [PATCH 2/2] Align CI Orchestrator property definitions with Jenkins parameters & ebcPlan parameter --- .ci-orchestrator/open-liberty-ci-ant-build.yml | 8 ++++---- jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile | 5 +++-- jenkins/open-liberty-ci-ant-build.jenkinsfile | 5 +++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.ci-orchestrator/open-liberty-ci-ant-build.yml b/.ci-orchestrator/open-liberty-ci-ant-build.yml index 5cf6ead..ae115b9 100644 --- a/.ci-orchestrator/open-liberty-ci-ant-build.yml +++ b/.ci-orchestrator/open-liberty-ci-ant-build.yml @@ -10,10 +10,10 @@ triggers: triggerRank: 50 groups: ["WebsphereCommonComponents"] propertyDefinitions: - - name: github_pr_sha + - name: repoSHA description: "The Full Commit Sha you wish to build" required: true - - name: github_pr_user + - name: repoUser description: "The GitHub user/fork owner (e.g. OpenLiberty or contributor)" defaultValue: "OpenLiberty" - type: github @@ -25,11 +25,11 @@ triggers: aliasKeywords: - "#build" propertyDefinitions: - - name: github_pr_sha + - name: repoSHA defaultValue: "${github_pr_sha}" description: "The Full Commit Sha you wish to build" required: true - - name: github_pr_user + - name: repoUser defaultValue: "${github_pr_user}" description: "The GitHub user/fork owner" diff --git a/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile b/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile index d61f8e2..9336bc9 100644 --- a/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile +++ b/jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile @@ -1,10 +1,11 @@ properties([ parameters([ string(name: 'executionId', defaultValue: UUID.randomUUID().toString(), description: 'Unique execution id.'), + string(name: 'ebcPlan', defaultValue: 'See Shortlist', description: 'EBC plan to use when provisioning a Jenkins node. Ignored when shortlist is supplied.'), string(name: 'ebcShortlist', defaultValue: 'jenkins-child.yml', description: 'Overrides the ebcPlan. This controls the EBC shortlist to use when provisioning a Jenkins node.'), string(name: 'ebcPriority', defaultValue: '90', description: 'Priority of the build execution on EBC.'), string(name: 'repoUser', defaultValue: 'OpenLiberty', description: 'GitHub user or org holding the repository/fork.'), - string(name: 'github_pr_sha', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), + string(name: 'repoSHA', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), string(name: 'ecosystemTracking', defaultValue: '"productArea":"Liberty"', description: 'Tracking Map as string often containing information about what CI Orchestrator pipeline.') ]) ]) @@ -27,7 +28,7 @@ timestamps { sh """ git init git remote add origin git@github.com:${params.repoUser}/ci.ant.git - git fetch --depth 1 origin ${params.github_pr_sha} + git fetch --depth 1 origin ${params.repoSHA} git checkout --detach FETCH_HEAD """ withEnv([ diff --git a/jenkins/open-liberty-ci-ant-build.jenkinsfile b/jenkins/open-liberty-ci-ant-build.jenkinsfile index bdf2296..7e985eb 100644 --- a/jenkins/open-liberty-ci-ant-build.jenkinsfile +++ b/jenkins/open-liberty-ci-ant-build.jenkinsfile @@ -1,10 +1,11 @@ properties([ parameters([ string(name: 'executionId', defaultValue: UUID.randomUUID().toString(), description: 'Unique execution id.'), + string(name: 'ebcPlan', defaultValue: 'See Shortlist', description: 'EBC plan to use when provisioning a Jenkins node. Ignored when shortlist is supplied.'), string(name: 'ebcShortlist', defaultValue: 'jenkins-child.yml', description: 'Overrides the ebcPlan. This controls the EBC shortlist to use when provisioning a Jenkins node.'), string(name: 'ebcPriority', defaultValue: '90', description: 'Priority of the build execution on EBC.'), string(name: 'repoUser', defaultValue: 'OpenLiberty', description: 'GitHub user or org holding the repository/fork.'), - string(name: 'github_pr_sha', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), + string(name: 'repoSHA', defaultValue: '', description: 'Head commit SHA of the PR being tested.'), string(name: 'ecosystemTracking', defaultValue: '"productArea":"Liberty"', description: 'Tracking Map as string often containing information about what CI Orchestrator pipeline.') ]) ]) @@ -27,7 +28,7 @@ timestamps { sh """ git init git remote add origin git@github.com:${params.repoUser}/ci.ant.git - git fetch --depth 1 origin ${params.github_pr_sha} + git fetch --depth 1 origin ${params.repoSHA} git checkout --detach FETCH_HEAD """ withEnv([