-
Notifications
You must be signed in to change notification settings - Fork 277
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 JAVA_HOME arguments in manifest workflow from template manifests. #2358
Merged
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
7d58522
Adding java home arg
zelinh e94faf4
Attach tests
zelinh 6eef6b3
Change to get ci data from templates instead of hardcoding
zelinh 75cf393
Fix flake8 error
zelinh 26b57fe
Keep simplifying the workflow.
zelinh 040ca0f
More changes
zelinh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
manifests/templates/opensearch-dashboards/1.x/manifest.yml
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,12 @@ | ||
--- | ||
schema-version: '1.0' | ||
build: | ||
name: OpenSearch Dashboards | ||
version: 1.3.4 | ||
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: tags/1.3.4 |
14 changes: 14 additions & 0 deletions
14
manifests/templates/opensearch-dashboards/2.x/manifest.yml
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,14 @@ | ||
--- | ||
schema-version: '1.0' | ||
build: | ||
name: OpenSearch Dashboards | ||
version: 2.1.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: tags/2.1.0 | ||
checks: | ||
- npm:package:version |
12 changes: 12 additions & 0 deletions
12
manifests/templates/opensearch-dashboards/3.x/manifest.yml
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,12 @@ | ||
--- | ||
schema-version: '1.0' | ||
build: | ||
name: OpenSearch Dashboards | ||
version: 3.0.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: main |
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,16 @@ | ||
--- | ||
schema-version: '1.0' | ||
build: | ||
name: OpenSearch | ||
version: 1.3.4 | ||
ci: | ||
image: | ||
name: opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2 | ||
args: -e JAVA_HOME=/opt/java/openjdk-11 | ||
components: | ||
- name: OpenSearch | ||
repository: https://github.com/opensearch-project/OpenSearch.git | ||
ref: tags/1.3.4 | ||
checks: | ||
- gradle:publish | ||
- gradle:properties:version |
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,16 @@ | ||
--- | ||
schema-version: '1.0' | ||
build: | ||
name: OpenSearch | ||
version: 2.1.0 | ||
ci: | ||
image: | ||
name: opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2 | ||
args: -e JAVA_HOME=/opt/java/openjdk-17 | ||
components: | ||
- name: OpenSearch | ||
repository: https://github.com/opensearch-project/OpenSearch.git | ||
ref: tags/2.1.0 | ||
checks: | ||
- gradle:publish | ||
- gradle:properties:version |
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,16 @@ | ||
--- | ||
schema-version: '1.0' | ||
build: | ||
name: OpenSearch | ||
version: 3.0.0 | ||
ci: | ||
image: | ||
name: opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2 | ||
args: -e JAVA_HOME=/opt/java/openjdk-17 | ||
components: | ||
- name: OpenSearch | ||
repository: https://github.com/opensearch-project/OpenSearch.git | ||
ref: main | ||
checks: | ||
- gradle:publish | ||
- gradle:properties:version |
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 |
---|---|---|
|
@@ -106,22 +106,23 @@ def update(self, min_klass: Union[Type[ComponentOpenSearchMin], Type[ComponentOp | |
self.add_to_cron(release_version) | ||
|
||
def create_manifest(self, version: str, components: List = []) -> InputManifest: | ||
image_map = { | ||
"opensearch": "opensearchstaging/ci-runner:ci-runner-centos7-opensearch-build-v2", | ||
"opensearch-dashboards": "opensearchstaging/ci-runner:ci-runner-centos7-opensearch-dashboards-build-v2" | ||
} | ||
templates_base_path = os.path.join(self.manifests_path(), "templates") | ||
template_version_folder = version.split(".")[0] + ".x" | ||
template_full_path = os.path.join(templates_base_path, self.prefix, template_version_folder, | ||
"manifest.yml") | ||
if os.path.exists(template_full_path): | ||
zelinh marked this conversation as resolved.
Show resolved
Hide resolved
|
||
input_manifest_templates = InputManifest.from_file(open(template_full_path)) | ||
else: | ||
input_manifest_templates = InputManifest.from_file(open(os.path.join(templates_base_path, self.prefix, | ||
"2.x", "manifest.yml"))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This hard-coding is bound to cause problems.
|
||
|
||
data: Dict = { | ||
"schema-version": "1.0", | ||
"build": { | ||
"name": self.name, | ||
"version": version | ||
}, | ||
"ci": { | ||
"image": { | ||
"name": image_map[self.prefix] | ||
} | ||
}, | ||
"ci": input_manifest_templates.ci.__to_dict__(), | ||
"components": [], | ||
} | ||
|
||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to do this because
to_dict
should compact the outcome. Just return what you have inelse
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dblock Actually I think we might need this. Otherwise it will output
args: None
in dashboard manifest it generated.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure we call
to_dict
, which removes theseNone
values.