Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rachana-dani authored Oct 20, 2023
2 parents 69f0070 + eda85eb commit 69c0d41
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 5 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/bump-bwc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Bump bwc version

on:
workflow_dispatch:
inputs:
tag:
type: string
required: true
push:
tags:
- '*.*.*.*'

permissions: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- uses: actions/checkout@v4
- name: Fetch Tag and Version Information
run: |
if [ -n ${{ inputs.tag }} ]; then
TAG=${{ inputs.tag }}
else
TAG=$(echo "${GITHUB_REF#refs/*/}")
fi
CURRENT_VERSION_ARRAY=($(echo "$TAG" | tr . '\n'))
CURRENT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
CURRENT_VERSION_ARRAY[1]=$((CURRENT_VERSION_ARRAY[1]+1))
NEXT_VERSION=$(IFS=. ; echo "${CURRENT_VERSION_ARRAY[*]:0:3}")
echo "TAG=$TAG" >> $GITHUB_ENV
echo "CURRENT_VERSION=$CURRENT_VERSION" >> $GITHUB_ENV
echo "NEXT_VERSION=$NEXT_VERSION" >> $GITHUB_ENV
- uses: actions/checkout@v4
with:
ref: main
token: ${{ steps.github_app_token.outputs.token }}

- name: Bump bwc version for main branch
run: |
echo Bumping bwc version to $NEXT_VERSION
sed -i "s/def bwcVersionShort = \"$CURRENT_VERSION\"/def bwcVersionShort = \"$NEXT_VERSION\"/g" notifications/notifications/build.gradle
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.github_app_token.outputs.token }}
base: main
branch: 'create-pull-request/patch-main'
commit-message: Bump bwc version to ${{ env.NEXT_VERSION }}
signoff: true
delete-branch: true
labels: |
autocut
title: '[AUTO] [main] Bump bwc version to ${{ env.NEXT_VERSION }}.'
body: |
I've noticed that a new tag ${{ env.TAG }} was pushed, and bump bwc version to ${{ env.NEXT_VERSION }}.
10 changes: 5 additions & 5 deletions .github/workflows/security-notifications-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ jobs:
- name: Run Notification Test for security enabled test cases
if: env.imagePresent == 'true'
run: |
cluster_running=`curl -XGET https://localhost:9200/_cat/plugins -u admin:admin --insecure`
echo $cluster_running
security=`curl -XGET https://localhost:9200/_cat/plugins -u admin:admin --insecure |grep opensearch-security|wc -l`
echo $security
container_id=`docker ps -q`
plugins=`docker exec $container_id /usr/share/opensearch/bin/opensearch-plugin list`
echo "plugins: $plugins"
security=`echo $plugins | grep opensearch-security | wc -l`
if [ $security -gt 0 ]
then
echo "Security plugin is available"
Expand All @@ -91,4 +91,4 @@ jobs:
else
echo "Security plugin is NOT available skipping this run as tests without security have already been run"
exit 1
fi
fi

0 comments on commit 69c0d41

Please sign in to comment.