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 rpm-validation pipelines trigger to opensearch and dashboards distribution builds #2021

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
20 changes: 20 additions & 0 deletions jenkins/opensearch-dashboards/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,16 @@ pipeline {
echo "buildManifestUrl (x64, rpm): ${buildManifestUrl}"
echo "artifactUrl (x64, rpm): ${artifactUrl}"

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)
]
}
}
post {
Expand Down Expand Up @@ -347,6 +357,16 @@ pipeline {
echo "buildManifestUrl (arm64, rpm): ${buildManifestUrl}"
echo "artifactUrl (arm64, rpm): ${artifactUrl}"

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)
]
}
}
post {
Expand Down
22 changes: 20 additions & 2 deletions jenkins/opensearch/distribution-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ pipeline {
}
steps {
script {
git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main'
buildManifest(
inputManifest: "manifests/${INPUT_MANIFEST}",
distribution: 'tar',
Expand Down Expand Up @@ -112,7 +111,6 @@ pipeline {
}
steps {
script {
git url: 'https://github.com/opensearch-project/opensearch-build.git', branch: 'main'
buildManifest(
inputManifest: "manifests/${INPUT_MANIFEST}",
distribution: 'tar',
Expand Down Expand Up @@ -237,6 +235,16 @@ pipeline {
echo "buildManifestUrl (x64, rpm): ${buildManifestUrl}"
echo "artifactUrl (x64, rpm): ${artifactUrl}"

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)
]
}
}
post {
Expand Down Expand Up @@ -350,6 +358,16 @@ pipeline {
echo "buildManifestUrl (arm64, rpm): ${buildManifestUrl}"
echo "artifactUrl (arm64, rpm): ${artifactUrl}"

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)
]
}
}
post {
Expand Down
2 changes: 1 addition & 1 deletion jenkins/rpm-validation/rpm-validation.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pipeline {
parameters {
string(
name: 'BUNDLE_MANIFEST_URL',
description: 'The bundle manifest url. (e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.0.0-rc1/2493/linux/x64/rpm/dist/opensearch/manifest.yml)',
description: 'The bundle manifest url, required for yum staging repo file. (e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.0.0-rc1/2493/linux/x64/rpm/dist/opensearch/manifest.yml)',
trim: true
)
string(
Expand Down
9 changes: 9 additions & 0 deletions src/jenkins/BuildManifest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ class BuildManifest implements Serializable {
].join("/")
}

public String getBundleManifestUrl(String publicArtifactUrl = 'https://ci.opensearch.org/ci/dbc', String jobName, String buildNumber) {
return [
this.getArtifactRootUrl(publicArtifactUrl, jobName, buildNumber),
'dist',
this.build.getFilename(),
'manifest.yml'
].join("/")
}

public String getArtifactUrl(String publicArtifactUrl = 'https://ci.opensearch.org/ci/dbc', String jobName, String buildNumber) {
return [
this.getArtifactRootUrl(publicArtifactUrl, jobName, buildNumber),
Expand Down