Skip to content

Commit

Permalink
Use alpha2 and upload release notes (#10)
Browse files Browse the repository at this point in the history
* Use alpha2 and upload release notes

Signed-off-by: Ashish Agrawal <[email protected]>
  • Loading branch information
lezzago authored Apr 26, 2021
1 parent c73abbb commit edaa6db
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.0.0-alpha1'
ref: '1.0.0-alpha2'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal -Dbuild.version_qualifier=alpha1 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dbuild.version_qualifier=alpha2 -Dbuild.snapshot=false
# This step adds dependency, common-utils
- name: Checkout common-utils
uses: actions/checkout@v2
Expand All @@ -41,7 +41,7 @@ jobs:
path: common-utils
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-alpha1
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-alpha2
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
Expand All @@ -51,4 +51,4 @@ jobs:
with:
java-version: 14
- name: Run integration tests with multi node config
run: ./gradlew integTest -PnumNodes=3 -Dopensearch.version=1.0.0-alpha1
run: ./gradlew integTest -PnumNodes=3 -Dopensearch.version=1.0.0-alpha2
10 changes: 5 additions & 5 deletions .github/workflows/test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ jobs:
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: '1.0.0-alpha1'
ref: '1.0.0-alpha2'
- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal -Dbuild.version_qualifier=alpha1 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dbuild.version_qualifier=alpha2 -Dbuild.snapshot=false

# dependencies: common-utils
- name: Checkout common-utils
Expand All @@ -48,10 +48,10 @@ jobs:
path: common-utils
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-alpha1
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-alpha2

- name: Build and run with Gradle
run: ./gradlew build -Dopensearch.version=1.0.0-alpha1
run: ./gradlew build -Dopensearch.version=1.0.0-alpha2

# - name: Create Artifact Path
# run: |
Expand All @@ -70,4 +70,4 @@ jobs:
# path: alerting-artifacts
# Publish to local maven
- name: Publish to Maven Local
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-alpha1
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0-alpha2
2 changes: 1 addition & 1 deletion alerting/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ integTest.getClusters().forEach{c -> c.plugin(project.getObjects().fileProperty(

def _numNodes = findProperty('numNodes') as Integer ?: 1
testClusters.integTest {
testDistribution = "OSS"
testDistribution = "ARCHIVE"
// Cluster shrink exception thrown if we try to set numberOfNodes to 1, so only apply if > 1
if (_numNodes > 1) numberOfNodes = _numNodes
// When running integration tests it doesn't forward the --debug-jvm to the cluster anymore
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ buildscript {
apply from: 'build-tools/repositories.gradle'

ext {
opensearch_version = System.getProperty("opensearch.version", "1.0.0-alpha1")
common_utils_version = '1.0.0.0'
opensearch_version = System.getProperty("opensearch.version", "1.0.0-alpha2")
common_utils_version = '1.0.0.0-alpha2'
kotlin_version = '1.3.72'
}

Expand Down
40 changes: 40 additions & 0 deletions release-notes/create_release_notes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# raw note means the draft release content copied down which is generated by Github workflow
# this script helps add the URLs to all PR and have the right release note filename

import os
import sys
import fileinput
import re

link_prefix = "https://github.com/opensearch-project/alerting/pull/"
searchExp = re.compile("([\(\[]).*?([\)\]])")

current_date = raw_input("what day is today (e.g. 2020-06-29): ")
file_path = raw_input("Path to raw note file (e.g., note.md): ")
plugin_name = "index-management"
plugin_version = raw_input('Plugin version (x.x.x.x): ')

app = 'OpenSearch'

app_version = raw_input(app + ' compatibility version (x.x.x): ')

for line in fileinput.input(file_path, inplace=True):
# Add title and OpenSearch/OpenSearchDashboards compatibility
if fileinput.isfirstline():
line = "## Version " + plugin_version + " " + current_date + "\n\n" \
"Compatible with " + app + " " + app_version + "\n"

# Add link to PRs
if '*' in line:
start = line.find('#') + 1
end = line.find(')', start)
pr_num = line[start:end]
line = re.sub(searchExp, "([#" + pr_num +
"](" + link_prefix + pr_num + "))", line)
sys.stdout.write(line)

new_file_path = "opensearch-" + plugin_name + ".release-notes-" + \
plugin_version + ".md"
os.rename(file_path, new_file_path)

print('\n\nDone!\n')

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Version 1.0.0.0-beta1 2021-04-26

Compatible with OpenSearch 1.0.0

### Enhancements
* Update plugin install name ([#9](https://github.com/opensearch-project/alerting/pull/9))
### Bug Fixes
* Update jackson CVE-2020-28491 ([#8](https://github.com/opensearch-project/alerting/pull/8))
### Infrastructure
* Fix integ tests so they execute successfully in the test workflow ([#7](https://github.com/opensearch-project/alerting/pull/7))
* Fix Test Workflow ([#6](https://github.com/opensearch-project/alerting/pull/6))
### Documentation
* Update licenses ([#5](https://github.com/opensearch-project/alerting/pull/5))
* Update documentation to remove more ES references and update licenses ([#4](https://github.com/opensearch-project/alerting/pull/4))
### Refactoring
* Change Kibana UserAgent to OpenSearchDashboards ([#3](https://github.com/opensearch-project/alerting/pull/3))
* Migrate Alerting to OpenSearch ([#1](https://github.com/opensearch-project/alerting/pull/1))
* Update version to alpha2 ([#10](https://github.com/opensearch-project/alerting/pull/10))

0 comments on commit edaa6db

Please sign in to comment.