forked from opensearch-project/opensearch-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sayali Gaikawad <gaiksaya@amazon.com>
- Loading branch information
Showing
1 changed file
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
*/ | ||
|
||
lib = library(identifier: 'jenkins@5.11.1', retriever: modernSCM([ | ||
$class: 'GitSCMSource', | ||
remote: 'https://github.com/opensearch-project/opensearch-build-libraries.git', | ||
])) | ||
|
||
pipeline { | ||
options { | ||
timeout(time: 4, unit: 'HOURS') | ||
} | ||
agent none | ||
environment { | ||
AGENT_LINUX_X64 = 'Jenkins-Agent-AL2023-X64-C54xlarge-Docker-Host' | ||
} | ||
parameters { | ||
string( | ||
name: 'RELEASE_VERSION', | ||
description: 'Release version', | ||
trim: true | ||
) | ||
string( | ||
name: 'OPENSEARCH_RC_BUILD_NUMBER', | ||
description: 'OpenSearch Release Candidate Build Number', | ||
trim: true | ||
) | ||
string( | ||
name: 'OPENSEARCH_DASHBOARDS_RC_BUILD_NUMBER', | ||
description: 'OpenSearch Dashboards Release Candidate Build Number', | ||
trim: true | ||
) | ||
} | ||
stages { | ||
stage('Parameters Check') { | ||
steps { | ||
script { | ||
currentBuild.description = """RELEASE: ${RELEASE_VERSION}<br>OS_RC: ${OPENSEARCH_RC_BUILD_NUMBER}<br>OSD_RC: ${OPENSEARCH_DASHBOARDS_RC_BUILD_NUMBER}""" | ||
if(RELEASE_VERSION.isEmpty() || OPENSEARCH_RC_BUILD_NUMBER.isEmpty() || OPENSEARCH_DASHBOARDS_RC_BUILD_NUMBER.isEmpty()) { | ||
currentBuild.result = 'ABORTED' | ||
error('Make sure all the parameters are passed in.') | ||
} | ||
} | ||
} | ||
} | ||
stage('Publish'){ | ||
parallel { | ||
stage('OpenSearch Debian Apt promotion') { | ||
agent { | ||
docker { | ||
label AGENT_LINUX_X64 | ||
image 'docker/library/alpine:3' | ||
registryUrl 'https://public.ecr.aws/' | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
echo 'Triggering distribution-promote-repos for OpenSearch Debian Apt' | ||
echo 'Promotion successful for Debian Apt OpenSearch!' | ||
} | ||
} | ||
stage('OpenSearch Yum promotion') { | ||
agent { | ||
docker { | ||
label AGENT_LINUX_X64 | ||
image 'docker/library/alpine:3' | ||
registryUrl 'https://public.ecr.aws/' | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
echo 'Triggering distribution-promote-repos for OpenSearch Yum' | ||
echo 'Promotion successful for OpenSearch yum!' | ||
} | ||
} | ||
stage('OpenSearch Dashboards Debian Apt promotion') { | ||
agent { | ||
docker { | ||
label AGENT_LINUX_X64 | ||
image 'docker/library/alpine:3' | ||
registryUrl 'https://public.ecr.aws/' | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
echo 'Triggering distribution-promote-repos for OpenSearch Dashboards apt' | ||
echo 'Promotion successful for Debian Apt OpenSearch Dashboards!' | ||
} | ||
} | ||
stage('OpenSearch Dashboards Yum promotion') { | ||
agent { | ||
docker { | ||
label AGENT_LINUX_X64 | ||
image 'docker/library/alpine:3' | ||
registryUrl 'https://public.ecr.aws/' | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
echo 'Promotion successful for OpenSearch Dashboards yum!' | ||
} | ||
} | ||
stage('OpenSearch Dashboards Linux tar x64') { | ||
agent { | ||
docker { | ||
label AGENT_LINUX_X64 | ||
image 'docker/library/alpine:3' | ||
registryUrl 'https://public.ecr.aws/' | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
echo 'Triggering distribution-promote-artifacts for OpenSearch Dashboards Linux tar x64' | ||
echo 'Promotion successful for OpenSearch Dashboards Linux tar x64!' | ||
} | ||
} | ||
} | ||
} | ||
stage('Publish OpenSearch Linux tar x64') { | ||
agent { | ||
docker { | ||
label AGENT_LINUX_X64 | ||
image 'docker/library/alpine:3' | ||
registryUrl 'https://public.ecr.aws/' | ||
alwaysPull true | ||
} | ||
} | ||
steps { | ||
echo 'Triggering distribution-promote-artifacts for OpenSearch Linux tar x64' | ||
echo 'Promotion successful for OpenSearch Linux rpm x64!' | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
node(AGENT_LINUX_X64) { | ||
checkout scm | ||
script { | ||
postCleanup() | ||
} | ||
} | ||
} | ||
} | ||
} |