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

Automation component release issue: Fix the bugs #3795

Merged
merged 2 commits into from
Jul 18, 2023
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
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/component_release_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ If including changes in this release, increment the version on `{{RELEASE_VERSIO
- [ ] Assign this issue to a release owner.
- [ ] Finalize scope and feature set and update [the Public Roadmap](https://github.com/orgs/opensearch-project/projects/1).
- [ ] All the tasks in this issue have been reviewed by the release owner.
- [ ] Create, update, triage and label all features and issues targeted for this release with `v__REPLACE_MAJOR_MINOR_PATCH__`.
- [ ] Create, update, triage and label all features and issues targeted for this release with `v{{RELEASE_VERSION}}`.

### CI/CD

- [ ] All code changes for `__{REPLACE_MAJOR_MINOR_PATCH}__` are complete.
- [ ] All code changes for `{{RELEASE_VERSION}}` are complete.
- [ ] Ensure working and passing CI.
- [ ] Check that this repo is included in the [distribution manifest](https://github.com/opensearch-project/opensearch-build/blob/main/manifests/{{RELEASE_VERSION}}).

Expand All @@ -45,7 +45,7 @@ If including changes in this release, increment the version on `{{RELEASE_VERSIO
- [ ] Update to the `{{RELEASE_VERSION}}` release branch in the [distribution manifest](https://github.com/opensearch-project/opensearch-build/blob/main/manifests/{{RELEASE_VERSION}}).
- [ ] Increment the version on the parent branch to the next development iteration.
- [ ] Gather, review and publish release notes following the [rules](https://github.com/opensearch-project/opensearch-plugins/blob/main/RELEASE_NOTES.md) and back port it to the release branch.[git-release-notes](https://github.com/ariatemplates/git-release-notes) may be used to generate release notes from your commit history.
- [ ] Confirm that all changes for `__{REPLACE_MAJOR_MINOR_PATCH}__` have been merged.
- [ ] Confirm that all changes for `{{RELEASE_VERSION}}` have been merged.
- [ ] Add this repo to the [manifest](https://github.com/opensearch-project/opensearch-build/blob/main/manifests/) for the next developer iteration.

### Release Testing
Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/os-release-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,40 +67,42 @@ jobs:
installation_id: 22958780
- name: Checkout
uses: actions/checkout@v3
- uses: dblock/[email protected]
env:
GITHUB_TOKEN: ${{ steps.github_app_token.outputs.token }}
VERSION: ${{ matrix.release_version }}
id: build-repo-release-issue
- name: Check if build repo release issue exists
id: check_if_build_repo_issue_exists
uses: actions-cool/issues-helper@v3
with:
search_existing: all
update_existing: false
filename: .github/ISSUE_TEMPLATE/release_template.md
- name: Check out build repo
uses: actions/checkout@v3
actions: 'find-issues'
repo: opensearch-project/opensearch-build
token: ${{ steps.github_app_token.outputs.token }}
issue-state: 'open'
title-includes: '[RELEASE] Release version ${{ matrix.release_version }}'
- name: Check out plugin repo
uses: actions/checkout@v3
with:
path: plugin-repo
repository: opensearch-project/${{ matrix.entry.repo }}
- name: Replace placeholders
run: |
# Read the file contents and replace the placeholders
file_path="../opensearch-build/.github/ISSUE_TEMPLATE/component_release_template.md"
RELEASE_VERSION="${{ matrix.release_version }}"
RELEASE_ISSUE="${{ steps.build-repo-release-issue.outputs.url }}"
RELEASE_VERSION_X=$(echo "${{ steps.build-repo-release-issue.outputs.url }}" | awk -F'.' '{print $1}').x
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
- name: Check if issue exists
id: check_if_issue_exists
- name: Check if plugin repo release issue exists
if: steps.check_if_build_repo_issue_exists.outputs.issues != '[]'
id: check_if_plugin_repo_issue_exists
uses: actions-cool/issues-helper@v3
with:
actions: 'find-issues'
repo: opensearch-project/${{ matrix.entry.repo }}
token: ${{ steps.github_app_token.outputs.token }}
issue-state: 'open'
title-includes: '[RELEASE] Release version ${{ matrix.release_version }}'
- name: Create Issue From File
if: steps.check_if_issue_exists.outputs.issues == '[]'
- name: Replace Placeholders
if: steps.check_if_plugin_repo_issue_exists.outputs.issues == '[]'
run: |
# Read the file contents and replace the placeholders
file_path="../opensearch-build/.github/ISSUE_TEMPLATE/component_release_template.md"
RELEASE_VERSION="${{ matrix.release_version }}"
RELEASE_ISSUE_NUMBER=$(echo '${{ steps.check_if_build_repo_issue_exists.outputs.issues }}' | jq '.[0].number')
RELEASE_ISSUE="https://github.com/opensearch-project/opensearch-build/issues/${RELEASE_ISSUE_NUMBER}"
RELEASE_VERSION_X=$(echo "${{ matrix.release_version }}" | awk -F'.' '{print $1}').x
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
- name: Create component release issue from file
if: steps.check_if_plugin_repo_issue_exists.outputs.issues == '[]'
uses: peter-evans/create-issue-from-file@v4
with:
title: '[RELEASE] Release version ${{ matrix.release_version }}'
Expand Down
46 changes: 24 additions & 22 deletions .github/workflows/osd-release-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,40 +62,42 @@ jobs:
installation_id: 22958780
- name: Checkout
uses: actions/checkout@v3
- uses: dblock/[email protected]
env:
GITHUB_TOKEN: ${{ steps.github_app_token.outputs.token }}
VERSION: ${{ matrix.release_version }}
id: build-repo-release-issue
- name: Check if build repo release issue exists
id: check_if_build_repo_issue_exists
uses: actions-cool/issues-helper@v3
with:
search_existing: all
update_existing: false
filename: .github/ISSUE_TEMPLATE/release_template.md
- name: Check out build repo
uses: actions/checkout@v3
actions: 'find-issues'
repo: opensearch-project/opensearch-build
token: ${{ steps.github_app_token.outputs.token }}
issue-state: 'open'
title-includes: '[RELEASE] Release version ${{ matrix.release_version }}'
- name: Check out plugin repo
uses: actions/checkout@v3
with:
path: plugin-repo
repository: opensearch-project/${{ matrix.entry.repo }}
- name: Replace placeholders
run: |
# Read the file contents and replace the placeholders
file_path="../opensearch-build/.github/ISSUE_TEMPLATE/component_release_template.md"
RELEASE_VERSION="${{ matrix.release_version }}"
RELEASE_ISSUE="${{ steps.build-repo-release-issue.outputs.url }}"
RELEASE_VERSION_X=$(echo "${{ steps.build-repo-release-issue.outputs.url }}" | awk -F'.' '{print $1}').x
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
- name: Check if issue exists
id: check_if_issue_exists
- name: Check if plugin repo release issue exists
if: steps.check_if_build_repo_issue_exists.outputs.issues != '[]'
id: check_if_plugin_repo_issue_exists
uses: actions-cool/issues-helper@v3
with:
actions: 'find-issues'
repo: opensearch-project/${{ matrix.entry.repo }}
token: ${{ steps.github_app_token.outputs.token }}
issue-state: 'open'
title-includes: '[RELEASE] Release version ${{ matrix.release_version }}'
- name: Create Issue From File
if: steps.check_if_issue_exists.outputs.issues == '[]'
- name: Replace Placeholders
if: steps.check_if_plugin_repo_issue_exists.outputs.issues == '[]'
run: |
# Read the file contents and replace the placeholders
file_path="../opensearch-build/.github/ISSUE_TEMPLATE/component_release_template.md"
RELEASE_VERSION="${{ matrix.release_version }}"
RELEASE_ISSUE_NUMBER=$(echo '${{ steps.check_if_build_repo_issue_exists.outputs.issues }}' | jq '.[0].number')
RELEASE_ISSUE="https://github.com/opensearch-project/opensearch-build/issues/${RELEASE_ISSUE_NUMBER}"
RELEASE_VERSION_X=$(echo "${{ matrix.release_version }}" | awk -F'.' '{print $1}').x
sed -e "s|{{RELEASE_VERSION}}|${RELEASE_VERSION}|g" -e "s|{{RELEASE_ISSUE}}|${RELEASE_ISSUE}|g" -e "s|{{RELEASE_VERSION_X}}|${RELEASE_VERSION_X}|g" "$file_path" > "$file_path.tmp" && mv "$file_path.tmp" "$file_path"
- name: Create component release issue from file
if: steps.check_if_plugin_repo_issue_exists.outputs.issues == '[]'
uses: peter-evans/create-issue-from-file@v4
with:
title: '[RELEASE] Release version ${{ matrix.release_version }}'
Expand Down
Loading