-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automation component release issue: Fix the bugs (#3795)
Signed-off-by: Prudhvi Godithi <[email protected]>
- Loading branch information
1 parent
850edbb
commit 2f606d6
Showing
3 changed files
with
51 additions
and
47 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 |
---|---|---|
|
@@ -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 }}' | ||
|
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 |
---|---|---|
|
@@ -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 }}' | ||
|