Skip to content

Commit

Permalink
Update promoteArtifacts to support win/zip and add timer for gradle c…
Browse files Browse the repository at this point in the history
…heck windows (#2869)

* test windows

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* test windows

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Add gradle changes

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Add gradle changes

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Update jenkinsfile

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
  • Loading branch information
peterzhuamazon authored Nov 9, 2022
1 parent 3176aff commit 449cee4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
14 changes: 11 additions & 3 deletions jenkins/gradle/gradle-check.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ pipeline {
printContributedVariables: false,
printPostContent: false
)
parameterizedCron '''
H 1 * * * %GIT_REFERENCE=main;AGENT_LABEL=Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host
H 4 * * * %GIT_REFERENCE=main;AGENT_LABEL=Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host
H 9 * * * %GIT_REFERENCE=1.x;AGENT_LABEL=Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host
H 12 * * * %GIT_REFERENCE=1.x;AGENT_LABEL=Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host
H 17 * * * %GIT_REFERENCE=2.x;AGENT_LABEL=Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host
H 20 * * * %GIT_REFERENCE=2.x;AGENT_LABEL=Jenkins-Agent-Windows2019-X64-C524xlarge-Single-Host
'''
}
environment {
USER_BUILD_CAUSE = currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause')
Expand Down Expand Up @@ -85,10 +93,10 @@ pipeline {
def pr_url = "${pr_to_clone_url}".replace(".git", "/pull/${pr_number}")
println("Triggered by GitHub: ${pr_to_clone_url}")
if ("$pr_number" == "Null") {
currentBuild.description = """<a href="${pr_to_clone_url}">Others</a>: ${pr_title}"""
currentBuild.description = """<a href="${pr_to_clone_url}">Others</a>: ${pr_title}<br>runner: ${AGENT_LABEL}"""
}
else {
currentBuild.description = """<a href="${pr_url}">PR #${pr_number}</a>: ${pr_title}"""
currentBuild.description = """<a href="${pr_url}">PR #${pr_number}</a>: ${pr_title}<br>runner: ${AGENT_LABEL}"""
}

runGradleCheck(
Expand All @@ -99,7 +107,7 @@ pipeline {
else {
println("Triggered by User or Triggered by Timer")
def repo_url = "${GIT_REPO_URL}".replace(".git", "/commit")
currentBuild.description = """git: <a href="${GIT_REPO_URL}">${GIT_REPO_URL}</a><br>ref: <a href="${repo_url}/${GIT_REFERENCE}">${GIT_REFERENCE}</a>"""
currentBuild.description = """git: <a href="${GIT_REPO_URL}">${GIT_REPO_URL}</a><br>ref: <a href="${repo_url}/${GIT_REFERENCE}">${GIT_REFERENCE}</a><br>runner: ${AGENT_LABEL}"""

runGradleCheck(
gitRepoUrl: "${GIT_REPO_URL}",
Expand Down
8 changes: 4 additions & 4 deletions jenkins/promotion/promote-artifacts.jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib = library(identifier: 'jenkins@1.0.4', retriever: modernSCM([
lib = library(identifier: 'jenkins@1.2.0', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -29,12 +29,12 @@ pipeline {
choice(
choices: ['linux', 'windows', 'darwin'],
name: 'DISTRIBUTION_PLATFORM',
description: 'What platform is this distribution build for?.'
description: 'What platform is this distribution build for?'
)
choice(
choices: ['x64', 'arm64'],
choices: ['arm64', 'x64'],
name: 'DISTRIBUTION_ARCHITECTURE',
description: 'What architecture is this distribution build for?.'
description: 'What architecture is this distribution build for?'
)
}
stages {
Expand Down

0 comments on commit 449cee4

Please sign in to comment.