Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .ci-orchestrator/open-liberty-ci-ant-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: repoSHA
description: "The Full Commit Sha you wish to build"
required: true
- name: repoUser
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"
Expand All @@ -17,6 +24,14 @@ triggers:
keyword: "!build"
aliasKeywords:
- "#build"
propertyDefinitions:
- name: repoSHA
defaultValue: "${github_pr_sha}"
description: "The Full Commit Sha you wish to build"
required: true
- name: repoUser
defaultValue: "${github_pr_user}"
description: "The GitHub user/fork owner"

steps:
- stepGroup: Build Open Liberty CI Ant dependency
Expand Down
4 changes: 1 addition & 3 deletions .ci-orchestrator/steps/OpenLibertyCIAntBuild.yml
Original file line number Diff line number Diff line change
@@ -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"
5 changes: 2 additions & 3 deletions .ci-orchestrator/steps/OpenLibertyCIAntDependencyBuild.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
- stepName: "OpenLibertyCIAntDependencyBuild"
coreStep: true
workType: Jenkins
projectName: OpenLibertyCIAntDependencyBuild
timeoutInMinutes: 30
timeoutInMinutes: 720
properties:
jenkinsServiceName: "websphere-extra-jenkins"
jenkinsServiceName: "websphere-extra-jenkins"
35 changes: 19 additions & 16 deletions jenkins/open-liberty-ci-ant-build-dependency.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,9 +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: '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: '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: '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.')
])
])
Expand All @@ -16,23 +18,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.repoSHA}
git checkout --detach FETCH_HEAD
"""
withEnv([
"executionId=${params.executionId}"
]) {
sh "./scripts/buildDependency.sh"
}
}
}
}
Expand Down
33 changes: 18 additions & 15 deletions jenkins/open-liberty-ci-ant-build.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,9 +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: 'github_pr_sha', defaultValue: '', description: 'Head commit SHA of the PR being tested.'),
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: '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.')
])
])
Expand All @@ -16,23 +18,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.repoSHA}
git checkout --detach FETCH_HEAD
"""
withEnv([
"executionId=${params.executionId}"
]) {
sh "./scripts/build.sh"
}
}
}
}
Expand Down
Loading