Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into py-gha
Browse files Browse the repository at this point in the history
  • Loading branch information
zelinh committed Dec 14, 2023
2 parents 4647cf2 + cc12806 commit 948d4a4
Show file tree
Hide file tree
Showing 22 changed files with 679 additions and 75 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ out.txt
vars/

test-report.yml
src/release_notes_workflow/results/*
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ typed-ast = "~=1.5.4"
zipp = "~=3.8.1"
importlib-metadata = "~=4.12.0"
ruamel-yaml = "~=0.17.21"
mistune = "~=3.0.1"

[dev-packages]

Expand Down
14 changes: 11 additions & 3 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions jenkins/check-for-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ pipeline {
triggers {
parameterizedCron '''
H 1 * * * %INPUT_MANIFEST=2.11.2/opensearch-2.11.2.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm deb zip
H/60 * * * * %INPUT_MANIFEST=1.3.14/opensearch-dashboards-1.3.14.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards;BUILD_PLATFORM=linux windows;BUILD_DISTRIBUTION=tar rpm deb zip
H 1 * * * %INPUT_MANIFEST=2.12.0/opensearch-dashboards-2.12.0.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards;BUILD_PLATFORM=linux windows;BUILD_DISTRIBUTION=tar rpm deb zip
H 1 * * * %INPUT_MANIFEST=2.12.0/opensearch-2.12.0.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm deb zip
H/60 * * * * %INPUT_MANIFEST=1.3.14/opensearch-1.3.14.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm deb zip
H */6 * * * %INPUT_MANIFEST=3.0.0/opensearch-3.0.0.yml;TEST_MANIFEST=3.0.0/opensearch-3.0.0-test.yml;TARGET_JOB_NAME=distribution-build-opensearch;BUILD_PLATFORM=linux macos windows;BUILD_DISTRIBUTION=tar rpm deb zip
H */6 * * * %INPUT_MANIFEST=3.0.0/opensearch-dashboards-3.0.0.yml;TEST_MANIFEST=3.0.0/opensearch-dashboards-3.0.0-test.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards;BUILD_PLATFORM=linux windows;BUILD_DISTRIBUTION=tar rpm deb zip
'''
Expand Down
39 changes: 36 additions & 3 deletions jenkins/opensearch-dashboards/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
Expand Down Expand Up @@ -274,7 +277,12 @@ pipeline {
}
post {
always {
postCleanup()
script{
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
}
}
Expand Down Expand Up @@ -371,7 +379,12 @@ pipeline {
}
post {
always {
postCleanup()
script{
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
}
}
Expand Down Expand Up @@ -465,6 +478,9 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
Expand Down Expand Up @@ -591,6 +607,9 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
Expand Down Expand Up @@ -688,7 +707,12 @@ pipeline {
}
post {
always {
postCleanup()
script {
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
}
}
Expand Down Expand Up @@ -785,6 +809,9 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
Expand Down Expand Up @@ -935,3 +962,9 @@ pipeline {
}
}

def markStageUnstableIfPluginsFailedToBuild() {
def stageLogs = getLogsForStage(stageName: "${STAGE_NAME}")
if (stageLogs.any{e -> e.contains('Failed plugins are')}) {
unstable('Some plugins failed to build. See the ./build.sh step for logs and more details')
}
}
52 changes: 41 additions & 11 deletions jenkins/opensearch/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* compatible open source license.
*/

lib = library(identifier: 'jenkins@5.11.1', retriever: modernSCM([
lib = library(identifier: 'jenkins@5.12.0', retriever: modernSCM([
$class: 'GitSCMSource',
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git',
]))
Expand Down Expand Up @@ -219,7 +219,9 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)

if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
Expand Down Expand Up @@ -259,7 +261,12 @@ pipeline {
}
post {
always {
postCleanup()
script {
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
}
}
Expand Down Expand Up @@ -310,7 +317,6 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)

postCleanup()
}
}
Expand Down Expand Up @@ -352,7 +358,12 @@ pipeline {
}
post {
always {
postCleanup()
script {
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
}
}
Expand Down Expand Up @@ -459,7 +470,9 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)

if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
Expand Down Expand Up @@ -499,7 +512,12 @@ pipeline {
}
post {
always {
postCleanup()
script {
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
}
}
Expand Down Expand Up @@ -550,7 +568,6 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)

postCleanup()
}
}
Expand Down Expand Up @@ -592,7 +609,12 @@ pipeline {
}
post {
always {
postCleanup()
script {
if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
}
}
Expand Down Expand Up @@ -633,7 +655,6 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)

postCleanup()
}
}
Expand Down Expand Up @@ -684,7 +705,9 @@ pipeline {
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"])
)

if (params.CONTINUE_ON_ERROR) {
markStageUnstableIfPluginsFailedToBuild()
}
postCleanup()
}
}
Expand Down Expand Up @@ -824,3 +847,10 @@ pipeline {
}
}
}

def markStageUnstableIfPluginsFailedToBuild() {
def stageLogs = getLogsForStage(stageName: "${STAGE_NAME}")
if (stageLogs.any{e -> e.contains('Failed plugins are')}) {
unstable('Some plugins failed to build. See the ./build.sh step for logs and more details')
}
}
5 changes: 2 additions & 3 deletions jenkins/opensearch/publish-min-snapshots.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,10 @@ pipeline {
label AGENT_MACOS_X64
}
}
tools {
jdk dockerAgent.javaVersion
}
steps {
script {
echo("Switching to Java ${env.javaVersionNumber} on Mac Docker Container")
sh("jenv local ${dockerAgent.javaVersion}")
buildManifest(
componentName: "OpenSearch",
inputManifest: "manifests/${INPUT_MANIFEST}",
Expand Down
Loading

0 comments on commit 948d4a4

Please sign in to comment.