From 39164c3a42a5f194d26bbc0e222b0a8ce507b1ba Mon Sep 17 00:00:00 2001 From: dblock Date: Sat, 14 Aug 2021 18:50:40 +0000 Subject: [PATCH] Build snapshot version by default. Signed-off-by: dblock --- .github/workflows/CI.yml | 31 ++++++++++++++----------------- build.gradle | 10 +++++----- 2 files changed, 19 insertions(+), 22 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d733b8396..966b37288 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -33,37 +33,37 @@ jobs: with: repository: 'opensearch-project/OpenSearch' path: OpenSearch - ref: '1.0' + ref: '1.x' - name: Build OpenSearch working-directory: ./OpenSearch - run: ./gradlew publishToMavenLocal -Dbuild.snapshot=false + run: ./gradlew publishToMavenLocal # dependencies: common-utils - name: Checkout common-utils uses: actions/checkout@v2 with: - ref: '1.0' + ref: 'main' repository: 'opensearch-project/common-utils' path: common-utils - name: Build common-utils working-directory: ./common-utils - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 + run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT # dependencies: job-scheduler - name: Checkout job-scheduler uses: actions/checkout@v2 with: - ref: '1.0' + ref: 'main' repository: 'opensearch-project/job-scheduler' path: job-scheduler - name: Build job-scheduler working-directory: ./job-scheduler - run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -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.0.0 -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 @@ -75,25 +75,22 @@ jobs: - name: Build and Run Tests run: | - ./gradlew build -Dopensearch.version=1.0.0 + ./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT - name: Publish to Maven Local run: | - ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 + ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT - 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 - version=1.0.0 - plugin_version=1.0.0.0 - echo $version + plugin=`ls build/distributions/*.zip` + version=1.1.0-SNAPSHOT + plugin_version=1.1.0.0-SNAPSHOT + echo Using OpenSearch $version with AD $plugin_version cd .. if docker pull opensearchstaging/opensearch:$version then diff --git a/build.gradle b/build.gradle index 3febf189c..6f0fccc1d 100644 --- a/build.gradle +++ b/build.gradle @@ -64,10 +64,6 @@ repositories { jcenter() } -ext { - isSnapshot = "true" == System.getProperty("build.snapshot", "true") -} - apply plugin: 'java' apply plugin: 'idea' apply plugin: 'opensearch.opensearchplugin' @@ -76,10 +72,14 @@ 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" + version = opensearch_version - "-SNAPSHOT" + ".0" if (isSnapshot) { version += "-SNAPSHOT" }