Skip to content

Commit

Permalink
Upstream merge
Browse files Browse the repository at this point in the history
Signed-off-by: prudhvigodithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Sep 12, 2022
2 parents 4504360 + d502f4a commit d3964dc
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/increment-plugin-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
branch:
- '1.3'
- 2.x
- '2.3'
- '2.4'
- 3.x
- '3.0'
exclude:
- {entry: {repo: geospatial}, branch: '1.3'}
- {entry: {repo: notifications, path: notifications}, branch: '1.3'}
Expand Down
1 change: 1 addition & 0 deletions jenkins/check-for-build.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ pipeline {
}
triggers {
parameterizedCron '''
H 1 * * * %INPUT_MANIFEST=2.4.0/opensearch-dashboards-2.4.0.yml;TARGET_JOB_NAME=distribution-build-opensearch-dashboards
H 1 * * * %INPUT_MANIFEST=2.4.0/opensearch-2.4.0.yml;TARGET_JOB_NAME=distribution-build-opensearch
H 1 * * * %INPUT_MANIFEST=1.3.6/opensearch-1.3.6.yml;TARGET_JOB_NAME=distribution-build-opensearch
H 1 * * * %INPUT_MANIFEST=3.0.0/opensearch-3.0.0.yml;TARGET_JOB_NAME=distribution-build-opensearch
Expand Down
2 changes: 1 addition & 1 deletion jenkins/opensearch-dashboards/integ-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pipeline {
)
string(
name: 'BUILD_MANIFEST_URL',
description: 'The build manifest URL, e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/2.0.0/98/linux/x64/builds/opensearch-dashboards/manifest.yml.',
description: 'The build manifest URL, e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/2.0.0/98/linux/x64/tar/builds/opensearch-dashboards/manifest.yml',
trim: true
)
string(
Expand Down
2 changes: 1 addition & 1 deletion jenkins/opensearch/perf-test.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pipeline {
parameters {
string(
name: 'BUNDLE_MANIFEST_URL',
description: 'The bundle manifest URL, e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/1.2.2/98/linux/x64/builds/opensearch/manifest.yml.',
description: 'The distribution manifest URL, e.g. https://ci.opensearch.org/ci/dbc/distribution-build-opensearch/2.3.0/6039/linux/x64/tar/dist/opensearch/manifest.yml',
trim: true
)
string(
Expand Down
12 changes: 12 additions & 0 deletions manifests/2.4.0/opensearch-dashboards-2.4.0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
schema-version: '1.0'
build:
name: OpenSearch Dashboards
version: 2.4.0
ci:
image:
name: opensearchstaging/ci-runner:ci-runner-centos7-opensearch-dashboards-build-v2
components:
- name: OpenSearch-Dashboards
repository: https://github.com/opensearch-project/OpenSearch-Dashboards.git
ref: 2.x
37 changes: 20 additions & 17 deletions src/manifests_workflow/input_manifests.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,26 +173,29 @@ def add_to_cron(self, version: str) -> None:
logging.info(f"Wrote {jenkinsfile}")

def add_to_versionincrement_workflow(self, version: str) -> None:
logging.info("Adding new version the version increment workflow")
versionincrement_workflow_file = self.versionincrement_workflow()
yaml = ruamel.yaml.YAML()
yaml.explicit_start = True
yaml.preserve_quotes = True
yaml.explicit_start = True # type: ignore
yaml.preserve_quotes = True # type: ignore

with open(versionincrement_workflow_file) as f:
data = yaml.load(f)

version_entry = version.split(".")[0] + ".x"
for branch in data["jobs"]["plugin-version-increment-sync"]["strategy"]["matrix"]["branch"]:
if version_entry in branch:
print(f"{versionincrement_workflow_file} already contains an entry for {version_entry}")
return None

branch_list = list(data["jobs"]["plugin-version-increment-sync"]["strategy"]["matrix"]["branch"])
branch_list.append(version_entry)
data["jobs"]["plugin-version-increment-sync"]["strategy"]["matrix"]["branch"] = branch_list
yaml.indent(mapping=2, sequence=4, offset=2)
with open(versionincrement_workflow_file, 'w') as f:
yaml.dump(data, f)

logging.info("Added new version the version increment workflow")
version_entry = []
major_version_entry = version.split(".")[0] + ".x"
minor_version_entry = version.rsplit(".", 1)[0]
if minor_version_entry not in data["jobs"]["plugin-version-increment-sync"]["strategy"]["matrix"]["branch"]:
print(f"Adding {minor_version_entry} to {versionincrement_workflow_file}")
version_entry.append(minor_version_entry)
if major_version_entry not in data["jobs"]["plugin-version-increment-sync"]["strategy"]["matrix"]["branch"]:
print(f"Adding {major_version_entry} to {versionincrement_workflow_file}")
version_entry.append(major_version_entry)

if version_entry:
branch_list = list(data["jobs"]["plugin-version-increment-sync"]["strategy"]["matrix"]["branch"])
branch_list.extend(version_entry)
data["jobs"]["plugin-version-increment-sync"]["strategy"]["matrix"]["branch"] = branch_list
yaml.indent(mapping=2, sequence=4, offset=2)
with open(versionincrement_workflow_file, 'w') as f:
yaml.dump(data, f)
logging.info("Added new version to the version increment workflow")

0 comments on commit d3964dc

Please sign in to comment.