Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add output rpm validation and descriptions for every build in Jenkins #2022

Merged
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
1 change: 1 addition & 0 deletions jenkins/docker/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pipeline {
}
steps {
script {
currentBuild.description = DOCKER_BUILD_SCRIPT_WITH_COMMANDS
git url: "$DOCKER_BUILD_GIT_REPOSITORY", branch: "$DOCKER_BUILD_GIT_REPOSITORY_REFERENCE"
def CREDENTIAL_ID = "jenkins-staging-docker-staging-credential"
if (env.IS_STAGING == "false") {
Expand Down
1 change: 1 addition & 0 deletions jenkins/opensearch-dashboards/bwc-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pipeline {
}
steps {
script {
currentBuild.description = TEST_MANIFEST
if (AGENT_LABEL == '') {
currentBuild.result = 'ABORTED'
error("BWC Tests failed to start. Missing parameter: AGENT_LABEL.")
Expand Down
58 changes: 42 additions & 16 deletions jenkins/opensearch-dashboards/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,30 @@ pipeline {
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)

echo "Trigger rpm validation for x64 rpm ${bundleManifestUrl}"
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_X64)
]
def rpmValidationResults =
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_X64)
]

env.RPM_VALIDATION_X64_RPM_TEST_RESULT = createTestResultsMessage(
testType: "RPM Validation (x64, rpm)",
status: rpmValidationResults.getResult(),
absoluteUrl: rpmValidationResults.getAbsoluteUrl()
)
}
}
post {
always {
script {
lib.jenkins.Messages.new(this).add(
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"]) +
"\n${env.RPM_VALIDATION_X64_RPM_TEST_RESULT}"
)

postCleanup()
}
}
Expand Down Expand Up @@ -360,17 +373,30 @@ pipeline {
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)

echo "Trigger rpm validation for arm64 rpm ${bundleManifestUrl}"
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_ARM64)
]
def rpmValidationResults =
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_ARM64)
]

env.RPM_VALIDATION_ARM64_RPM_TEST_RESULT = createTestResultsMessage(
testType: "RPM Validation (arm64, rpm)",
status: rpmValidationResults.getResult(),
absoluteUrl: rpmValidationResults.getAbsoluteUrl()
)
}
}
post {
always {
script {
lib.jenkins.Messages.new(this).add(
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"]) +
"\n${env.RPM_VALIDATION_ARM64_RPM_TEST_RESULT}"
)

postCleanup()
}
}
Expand Down
1 change: 1 addition & 0 deletions jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ pipeline {
}
steps {
script {
currentBuild.description = TEST_MANIFEST
if (AGENT_LABEL == '') {
currentBuild.result = 'ABORTED'
error("Integration Tests failed to start. Missing parameter: AGENT_LABEL.")
Expand Down
1 change: 1 addition & 0 deletions jenkins/opensearch/bwc-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pipeline {
}
steps {
script {
currentBuild.description = TEST_MANIFEST
if (AGENT_LABEL == '') {
currentBuild.result = 'ABORTED'
error("BWC Tests failed to start. Missing parameter: AGENT_LABEL.")
Expand Down
60 changes: 44 additions & 16 deletions jenkins/opensearch/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -238,18 +238,33 @@ pipeline {
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)

echo "Trigger rpm validation for x64 rpm ${bundleManifestUrl}"
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_X64)
]
def rpmValidationResults =
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_X64)
]

env.RPM_VALIDATION_X64_RPM_TEST_RESULT = createTestResultsMessage(
testType: "RPM Validation (x64, rpm)",
status: rpmValidationResults.getResult(),
absoluteUrl: rpmValidationResults.getAbsoluteUrl()
)
}
}
post {
always {
postCleanup()
script {
lib.jenkins.Messages.new(this).add(
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"]) +
"\n${env.RPM_VALIDATION_X64_RPM_TEST_RESULT}"
)

postCleanup()
}
}
}
}
Expand Down Expand Up @@ -361,17 +376,30 @@ pipeline {
String bundleManifestUrl = buildManifestObj.getBundleManifestUrl(JOB_NAME, BUILD_NUMBER)

echo "Trigger rpm validation for arm64 rpm ${bundleManifestUrl}"
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_ARM64)
]
def rpmValidationResults =
build job: 'rpm-validation',
propagate: false,
wait: true,
parameters: [
string(name: 'BUNDLE_MANIFEST_URL', value: bundleManifestUrl),
string(name: 'AGENT_LABEL', value: AGENT_ARM64)
]

env.RPM_VALIDATION_ARM64_RPM_TEST_RESULT = createTestResultsMessage(
testType: "RPM Validation (arm64, rpm)",
status: rpmValidationResults.getResult(),
absoluteUrl: rpmValidationResults.getAbsoluteUrl()
)
}
}
post {
always {
script {
lib.jenkins.Messages.new(this).add(
"${STAGE_NAME}",
lib.jenkins.Messages.new(this).get(["${STAGE_NAME}"]) +
"\n${env.RPM_VALIDATION_ARM64_RPM_TEST_RESULT}"
)

postCleanup()
}
}
Expand Down
1 change: 1 addition & 0 deletions jenkins/opensearch/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ pipeline {
}
steps {
script {
currentBuild.description = TEST_MANIFEST
if (AGENT_LABEL == '') {
currentBuild.result = 'ABORTED'
error("Integration Tests failed to start. Missing parameter: AGENT_LABEL.")
Expand Down
1 change: 1 addition & 0 deletions jenkins/rpm-validation/rpm-validation.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pipeline {
}
steps {
script {
currentBuild.description = BUNDLE_MANIFEST_URL
rpmDistValidation(
bundleManifestURL: "$BUNDLE_MANIFEST_URL"
)
Expand Down