Skip to content

Commit

Permalink
Upgrade dependencies to 1.1 and build snapshot by default. (opensearc…
Browse files Browse the repository at this point in the history
…h-project#121)

Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock authored Aug 19, 2021
1 parent c081669 commit ec05789
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 70 deletions.
22 changes: 6 additions & 16 deletions .github/workflows/multi-node-test-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ 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
Expand All @@ -39,32 +39,22 @@ jobs:
ref: 'main'
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
# dependencies: job-scheduler
- name: Checkout job-scheduler
uses: actions/checkout@v2
with:
repository: 'opensearch-project/job-scheduler'
path: job-scheduler
ref: '1.0'
ref: 'main'
- name: Build job-scheduler
working-directory: ./job-scheduler
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
# dependencies: alerting-notification
- name: Checkout alerting
uses: actions/checkout@v2
with:
repository: 'opensearch-project/alerting'
path: alerting
ref: '1.0'
- name: Build alerting
working-directory: ./alerting
run: ./gradlew :alerting-notification:publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
# index-management
- name: Checkout Branch
uses: actions/checkout@v2
- name: Run integration tests with multi node config
run: ./gradlew integTest -PnumNodes=3
run: ./gradlew integTest -PnumNodes=3 -Dopensearch.version=1.1.0-SNAPSHOT
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
Expand Down
24 changes: 7 additions & 17 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ 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
Expand All @@ -39,32 +39,22 @@ jobs:
ref: 'main'
- name: Build common-utils
working-directory: ./common-utils
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
# dependencies: job-scheduler
- name: Checkout job-scheduler
uses: actions/checkout@v2
with:
repository: 'opensearch-project/job-scheduler'
path: job-scheduler
ref: '1.0'
ref: 'main'
- name: Build job-scheduler
working-directory: ./job-scheduler
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
# dependencies: alerting-notification
- name: Checkout alerting
uses: actions/checkout@v2
with:
repository: 'opensearch-project/alerting'
path: alerting
ref: '1.0'
- name: Build alerting
working-directory: ./alerting
run: ./gradlew :alerting-notification:publishToMavenLocal -Dopensearch.version=1.0.0 -Dbuild.snapshot=false
# index-management
run: ./gradlew publishToMavenLocal -Dopensearch.version=1.1.0-SNAPSHOT
# build index management
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build with Gradle
run: ./gradlew build
run: ./gradlew build -Dopensearch.version=1.1.0-SNAPSHOT
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ out/
*.iws
.DS_Store
*.log
http
http
.project
.settings
24 changes: 14 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ import java.util.function.Predicate

buildscript {
ext {
opensearch_version = System.getProperty("opensearch.version", "1.0.0")
opensearch_version = System.getProperty("opensearch.version", "1.1.0-SNAPSHOT")
// 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.version", opensearch_build)
kotlin_version = System.getProperty("kotlin.version", "1.4.0")
}

Expand Down Expand Up @@ -139,25 +143,29 @@ configurations.testCompile {

ext {
projectSubstitutions = [:]
opensearchVersion = "${version}"
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
licenseFile = rootProject.file('LICENSE')
noticeFile = rootProject.file('NOTICE')
}

group = "org.opensearch"
version = "${opensearchVersion}.0"
allprojects {
group = "org.opensearch"
version = "${opensearch_version}" - "-SNAPSHOT" + ".0"
if (isSnapshot) {
version += "-SNAPSHOT"
}
}

dependencies {
compileOnly "org.opensearch:opensearch:${opensearch_version}"
compileOnly "org.opensearch:opensearch-job-scheduler-spi:1.0.0.0"
compileOnly "org.opensearch:opensearch-job-scheduler-spi:${job_scheduler_version}"
compile group: 'commons-codec', name: 'commons-codec', version: '1.13'
compile "org.jetbrains.kotlin:kotlin-stdlib:${kotlin_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib-common:${kotlin_version}"
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${kotlin_version}"
compile 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9'
compile "org.jetbrains:annotations:13.0"
compile "org.opensearch:common-utils:1.0.0.0"
compile "org.opensearch:common-utils:${common_utils_version}"
compile "com.github.seancfoley:ipaddress:5.3.3"

testCompile "org.opensearch.test:framework:${opensearch_version}"
Expand All @@ -176,10 +184,6 @@ repositories {
mavenLocal()
}

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

plugins.withId('java') {
sourceCompatibility = targetCompatibility = "1.8"
}
Expand Down
26 changes: 0 additions & 26 deletions gradle.properties

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit ec05789

Please sign in to comment.