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.
Add a new product parameter to include tag creation for both OpenSear… (
opensearch-project#1773) * Add a new product parameter to include tag creation for both OpenSearch & OpenSearch Dashboards Signed-off-by: Zelin Hao <[email protected]> * Rename the parameter to distribution manifest and add tests for dashboards Signed-off-by: Zelin Hao <[email protected]>
- Loading branch information
Showing
9 changed files
with
170 additions
and
20 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
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,34 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
|
||
import jenkins.tests.BuildPipelineTest | ||
import org.junit.Before | ||
import org.junit.Test | ||
|
||
class TestReleaseTagDashboardsJob extends BuildPipelineTest { | ||
|
||
@Before | ||
void setUp() { | ||
|
||
def distManifest = 'tests/data/opensearch-dashboards-build-1.2.0.yml' | ||
|
||
this.registerLibTester(new CreateReleaseTagLibTester(distManifest, '1.2.0')) | ||
|
||
super.setUp() | ||
|
||
// Variables for Release Tag Job | ||
binding.setVariable('VERSION', '1.2.0') | ||
binding.setVariable('PRODUCT', 'opensearch-dashboards') | ||
binding.setVariable('DISTRIBUTION_MANIFEST', distManifest) | ||
|
||
} | ||
|
||
@Test | ||
void ReleaseTagDashboards_test() { | ||
super.testPipeline('jenkins/release-tag/release-tag.jenkinsfile', | ||
'tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag-dashboards.jenkinsfile') | ||
} | ||
} |
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
110 changes: 110 additions & 0 deletions
110
tests/jenkins/jenkinsjob-regression-files/release-tag/release-tag-dashboards.jenkinsfile.txt
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,110 @@ | ||
release-tag.run() | ||
release-tag.legacySCM(groovy.lang.Closure) | ||
release-tag.library({identifier=jenkins@20211123, retriever=null}) | ||
release-tag.pipeline(groovy.lang.Closure) | ||
release-tag.timeout({time=2, unit=HOURS}) | ||
release-tag.echo(Executing on agent [docker:[image:opensearchstaging/ci-runner:centos7-x64-arm64-jdkmulti-node10.24.1-cypress6.9.1-20211130, reuseNode:false, stages:[:], args:, alwaysPull:true, containerPerStageRoot:false, label:Jenkins-Agent-al2-x64-c54xlarge-Docker-Host]]) | ||
release-tag.stage(Create Release Tag, groovy.lang.Closure) | ||
release-tag.script(groovy.lang.Closure) | ||
release-tag.sh(curl -SLO https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/1.2.0/opensearch-dashboards-1.2.0-linux-x64.tar.gz && tar -xf opensearch-dashboards-1.2.0-linux-x64.tar.gz opensearch-dashboards-1.2.0/manifest.yml) | ||
release-tag.echo(The release distribution manifest is downloaded to tests/data/opensearch-dashboards-build-1.2.0.yml) | ||
release-tag.createReleaseTag({distManifest=tests/data/opensearch-dashboards-build-1.2.0.yml, tagVersion=1.2.0}) | ||
createReleaseTag.legacySCM(groovy.lang.Closure) | ||
createReleaseTag.library({identifier=jenkins@20211123, retriever=null}) | ||
createReleaseTag.readYaml({file=tests/data/opensearch-dashboards-build-1.2.0.yml}) | ||
BuildManifest.asBoolean() | ||
BuildManifest.getNames() | ||
createReleaseTag.echo(Creating 1.2.0 release tag for 10 components in the manifest) | ||
createReleaseTag.usernamePassword({credentialsId=dummy_token_name, usernameVariable=GITHUB_USER, passwordVariable=GITHUB_TOKEN}) | ||
createReleaseTag.withCredentials([[GITHUB_USER, GITHUB_TOKEN]], groovy.lang.Closure) | ||
BuildManifest.getCommitId(ganttChartDashboards) | ||
BuildManifest.getRepo(ganttChartDashboards) | ||
createReleaseTag.echo(Tagging ganttChartDashboards at 2123bc65873e026cb8b0fd26816a6b1980bd19ce ...) | ||
createReleaseTag.dir(ganttChartDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=2123bc65873e026cb8b0fd26816a6b1980bd19ce}], userRemoteConfigs=[{url=https://github.com/opensearch-project/dashboards-visualizations.git}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/dashboards-visualizations.git 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Tag 1.2.0.0 has been created with identical commit ID. Skipping creating new tag for ganttChartDashboards.) | ||
BuildManifest.getCommitId(indexManagementDashboards) | ||
BuildManifest.getRepo(indexManagementDashboards) | ||
createReleaseTag.echo(Tagging indexManagementDashboards at 6748b18ee172138b4811a459053f4a43c1486821 ...) | ||
createReleaseTag.dir(indexManagementDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=6748b18ee172138b4811a459053f4a43c1486821}], userRemoteConfigs=[{url=https://github.com/opensearch-project/index-management-dashboards-plugin}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/index-management-dashboards-plugin 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for indexManagementDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/index-management-dashboards-plugin 1.2.0.0) | ||
BuildManifest.getCommitId(anomalyDetectionDashboards) | ||
BuildManifest.getRepo(anomalyDetectionDashboards) | ||
createReleaseTag.echo(Tagging anomalyDetectionDashboards at c4921f4471aeab38db80eb47cd92b4f7a3e04126 ...) | ||
createReleaseTag.dir(anomalyDetectionDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=c4921f4471aeab38db80eb47cd92b4f7a3e04126}], userRemoteConfigs=[{url=https://github.com/opensearch-project/anomaly-detection-dashboards-plugin}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/anomaly-detection-dashboards-plugin 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for anomalyDetectionDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/anomaly-detection-dashboards-plugin 1.2.0.0) | ||
BuildManifest.getCommitId(OpenSearch-Dashboards) | ||
BuildManifest.getRepo(OpenSearch-Dashboards) | ||
createReleaseTag.echo(Tagging OpenSearch-Dashboards at caf668e73304bac890f41c37cd6c3a41257cd289 ...) | ||
createReleaseTag.dir(OpenSearch-Dashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=caf668e73304bac890f41c37cd6c3a41257cd289}], userRemoteConfigs=[{url=https://github.com/opensearch-project/OpenSearch-Dashboards.git}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/OpenSearch-Dashboards.git 1.2.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0 tag for OpenSearch-Dashboards) | ||
createReleaseTag.sh(git tag 1.2.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/OpenSearch-Dashboards.git 1.2.0) | ||
BuildManifest.getCommitId(securityDashboards) | ||
BuildManifest.getRepo(securityDashboards) | ||
createReleaseTag.echo(Tagging securityDashboards at 960ef753f74dceb793e8936a40ac8c6cbec88dd1 ...) | ||
createReleaseTag.dir(securityDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=960ef753f74dceb793e8936a40ac8c6cbec88dd1}], userRemoteConfigs=[{url=https://github.com/opensearch-project/security-dashboards-plugin.git}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/security-dashboards-plugin.git 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for securityDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/security-dashboards-plugin.git 1.2.0.0) | ||
BuildManifest.getCommitId(functionalTestDashboards) | ||
BuildManifest.getRepo(functionalTestDashboards) | ||
createReleaseTag.echo(Tagging functionalTestDashboards at 208227256bf6dece2976da528bf41bae56e4effc ...) | ||
createReleaseTag.dir(functionalTestDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=208227256bf6dece2976da528bf41bae56e4effc}], userRemoteConfigs=[{url=https://github.com/opensearch-project/opensearch-dashboards-functional-test.git}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/opensearch-dashboards-functional-test.git 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for functionalTestDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/opensearch-dashboards-functional-test.git 1.2.0.0) | ||
BuildManifest.getCommitId(alertingDashboards) | ||
BuildManifest.getRepo(alertingDashboards) | ||
createReleaseTag.echo(Tagging alertingDashboards at 07d4cb8bc9c62b15bf7cb4fd4e3fc3a818f9152d ...) | ||
createReleaseTag.dir(alertingDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=07d4cb8bc9c62b15bf7cb4fd4e3fc3a818f9152d}], userRemoteConfigs=[{url=https://github.com/opensearch-project/alerting-dashboards-plugin}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/alerting-dashboards-plugin 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for alertingDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/alerting-dashboards-plugin 1.2.0.0) | ||
BuildManifest.getCommitId(queryWorkbenchDashboards) | ||
BuildManifest.getRepo(queryWorkbenchDashboards) | ||
createReleaseTag.echo(Tagging queryWorkbenchDashboards at a675eac2ed32a228184c47c289cfd22fde479139 ...) | ||
createReleaseTag.dir(queryWorkbenchDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=a675eac2ed32a228184c47c289cfd22fde479139}], userRemoteConfigs=[{url=https://github.com/opensearch-project/sql.git}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/sql.git 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for queryWorkbenchDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/sql.git 1.2.0.0) | ||
BuildManifest.getCommitId(reportsDashboards) | ||
BuildManifest.getRepo(reportsDashboards) | ||
createReleaseTag.echo(Tagging reportsDashboards at 290523a6d825c9c073818aebfcbe4813cb2554bc ...) | ||
createReleaseTag.dir(reportsDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=290523a6d825c9c073818aebfcbe4813cb2554bc}], userRemoteConfigs=[{url=https://github.com/opensearch-project/dashboards-reports.git}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/dashboards-reports.git 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for reportsDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/dashboards-reports.git 1.2.0.0) | ||
BuildManifest.getCommitId(observabilityDashboards) | ||
BuildManifest.getRepo(observabilityDashboards) | ||
createReleaseTag.echo(Tagging observabilityDashboards at 4fde4040c0a43233b41a862a169e2bd1616f6b1b ...) | ||
createReleaseTag.dir(observabilityDashboards, groovy.lang.Closure) | ||
createReleaseTag.checkout({$class=GitSCM, branches=[{name=4fde4040c0a43233b41a862a169e2bd1616f6b1b}], userRemoteConfigs=[{url=https://github.com/opensearch-project/trace-analytics.git}]}) | ||
createReleaseTag.sh({script=git ls-remote --tags https://github.com/opensearch-project/trace-analytics.git 1.2.0.0 | awk 'NR==1{print $1}', returnStdout=true}) | ||
createReleaseTag.echo(Creating 1.2.0.0 tag for observabilityDashboards) | ||
createReleaseTag.sh(git tag 1.2.0.0) | ||
createReleaseTag.sh(git push https://[email protected]/opensearch-project/trace-analytics.git 1.2.0.0) | ||
release-tag.script(groovy.lang.Closure) | ||
release-tag.postCleanup() | ||
postCleanup.cleanWs({disableDeferredWipeout=true, deleteDirs=true}) |
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
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
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
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
Oops, something went wrong.