Skip to content
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
17 changes: 7 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
repository: 'opensearch-project/OpenSearch'
path: OpenSearch
ref: 'main'
ref: '1.x'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we changing the branch ref for OpenSearch to 1.x from main? Wouldn't main of anomaly-detection refer to main of OpenSearch and 1.x of anomaly-detection refer to 1.x of OpenSearch?

Copy link
Copy Markdown
Member Author

@dblock dblock Aug 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenSearch is already developing a 2.0 on main, and 1.1 on the 1.x branch.

None of the plugins I know have a 2.0 line yet, and are developing 1.1 on main.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still see the 1.1.0 version in OpenSearch main: https://github.com/opensearch-project/OpenSearch/blob/main/buildSrc/version.properties#L1. Let me know if I am not looking at the right place.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should get updated to 2.0 but it will break the world. We've only be backporting 1.x changes into 1.x.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

- name: Build OpenSearch
working-directory: ./OpenSearch
run: ./gradlew publishToMavenLocal
Expand All @@ -59,11 +59,11 @@ jobs:

- name: Build job-scheduler
working-directory: ./job-scheduler
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
- name: Assemble job-scheduler
working-directory: ./job-scheduler
run: |
./gradlew assemble -Dopensearch.version=1.1.0-SNAPSHOT -Dbuild.snapshot=false
./gradlew assemble -Dopensearch.version=1.1.0-SNAPSHOT
echo "Creating ../src/test/resources/job-scheduler ..."
mkdir -p ../src/test/resources/job-scheduler
pwd
Expand All @@ -83,17 +83,14 @@ jobs:

- name: Multi Nodes Integration Testing
run: |
./gradlew integTest -PnumNodes=3
./gradlew integTest -PnumNodes=3

- name: Pull and Run Docker
run: |
## plugin=`ls build/distributions/*.zip`
## version=`echo $plugin|awk -F- '{print $4}'| cut -d. -f 1-3`
## plugin_version=`echo $plugin|awk -F- '{print $4}'| cut -d. -f 1-4`
## TODO: remove these two hard code versions below after GA release
plugin=`ls build/distributions/*.zip`
version=1.1.0-SNAPSHOT
plugin_version=1.1.0.0
echo $version
plugin_version=1.1.0.0-SNAPSHOT
echo Using OpenSearch $version with AD $plugin_version
cd ..
if docker pull opensearchstaging/opensearch:$version
then
Expand Down
22 changes: 13 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ buildscript {
ext {
opensearch_group = "org.opensearch"
opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT")
common_utils_version = System.getProperty("common_utils.version", "1.1.0.0")
job_scheduler_version = System.getProperty("job_scheduler.version", "1.1.0.0")
// 1.1.0 -> 1.1.0.0, and 1.1.0-SNAPSHOT -> 1.1.0.0-SNAPSHOT
opensearch_build = opensearch_version.replaceAll(/(\.\d)([^\d]*)$/, '$1.0$2')
common_utils_version = System.getProperty("common_utils.version", opensearch_build)
job_scheduler_version = System.getProperty("job_scheduler.version", opensearch_build)
}

repositories {
Expand Down Expand Up @@ -62,13 +64,6 @@ repositories {
jcenter()
}

ext {
opensearchVersion = System.getProperty("opensearch.version", "1.1.0")
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

version = "${opensearchVersion}.0"

apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'opensearch.opensearchplugin'
Expand All @@ -77,9 +72,18 @@ apply plugin: 'base'
apply plugin: 'jacoco'
apply plugin: 'eclipse'

ext {
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
}

allprojects {
group = 'org.opensearch'

version = opensearch_version - "-SNAPSHOT" + ".0"
if (isSnapshot) {
version += "-SNAPSHOT"
}

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
}
Expand Down