Skip to content

Commit

Permalink
Test auto cut branch
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Li <joshuali925@gmail.com>
  • Loading branch information
joshuali925 committed Aug 18, 2022
1 parent ce15448 commit cccf0cb
Show file tree
Hide file tree
Showing 19 changed files with 79 additions and 1,125 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/backport.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/workflows/bi-connectors.yml

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/dco.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/delete_backport_branch.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/draft-release-notes-workflow.yml

This file was deleted.

79 changes: 79 additions & 0 deletions .github/workflows/increment-plugin-versions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
---
name: Increment Plugin Versions

on:
workflow_dispatch:
inputs:
logLevel:
description: Log level
required: true
default: warning
type: choice
options:
- info
- warning
- debug

jobs:
plugin-version-increment-sync:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
entry:
- {repo: sql}
branch:
- 'main'
steps:
- name: Check out OpenSearch repo
uses: actions/checkout@v3
with:
repository: opensearch-project/OpenSearch
ref: ${{ matrix.branch }}
- name: Fetch OpenSearch version
run: |
OPENSEARCH_VERSION=$(cat buildSrc/version.properties | grep opensearch | cut -d= -f2 | grep -oE '[0-9.]+')
MAJOR_VERSION_BRANCH_NAME=$(echo $OPENSEARCH_VERSION | grep -o '[0-9]\.[0-9]')
echo "MAJOR_VERSION_BRANCH_NAME=$MAJOR_VERSION_BRANCH_NAME" >> $GITHUB_ENV
echo "OPENSEARCH_VERSION_NUMBER=$OPENSEARCH_VERSION" >> $GITHUB_ENV
OPENSEARCH_VERSION=$OPENSEARCH_VERSION-SNAPSHOT
echo "OPENSEARCH_VERSION=$OPENSEARCH_VERSION" >> $GITHUB_ENV
- name: Check out plugin repo
uses: actions/checkout@v3
with:
repository: joshuali925/${{ matrix.entry.repo }}
ref: ${{ matrix.branch }}
- name: Create next major release branch
uses: peterjgrainger/action-create-branch@v2.2.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: ${{ env.MAJOR_VERSION_BRANCH_NAME }}
- name: Increment Version in ${{ matrix.entry.repo }}
run: |
echo "OpenSearch Core repo version on branch ${{ matrix.branch }} is ${{ env.OPENSEARCH_VERSION_NUMBER }}"
if [ ${{ matrix.entry.path }} ]; then
echo "The gradle path is ${{ matrix.entry.path }}"
cd ${{ matrix.entry.path }}
fi
./gradlew updateVersion -DnewVersion=${{ env.OPENSEARCH_VERSION }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
committer: opensearch-ci-bot <opensearch-infra@amazon.com>
author: opensearch-ci-bot <opensearch-infra@amazon.com>
commit-message: |
Increment version to ${{ env.OPENSEARCH_VERSION }}
Signed-off-by: opensearch-ci-bot <opensearch-infra@amazon.com>
delete-branch: true
branch: create-pull-request/${{ env.OPENSEARCH_VERSION }}
base: ${{ env.MAJOR_VERSION_BRANCH_NAME }}
title: '[AUTO] Increment version to ${{ env.OPENSEARCH_VERSION }}'
body: |
- Incremented version to **${{ env.OPENSEARCH_VERSION }}**.
- name: Check outputs
run: |-
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
23 changes: 0 additions & 23 deletions .github/workflows/link-checker.yml

This file was deleted.

71 changes: 0 additions & 71 deletions .github/workflows/sql-cli-release-workflow.yml

This file was deleted.

Loading

0 comments on commit cccf0cb

Please sign in to comment.