Skip to content

Commit

Permalink
Read BWC Version from Github workflow (opensearch-project#476)
Browse files Browse the repository at this point in the history
Signed-off-by: Naveen Tatikonda <[email protected]>
  • Loading branch information
naveentatikonda authored Jul 28, 2022
1 parent 386be0e commit 9f71ede
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/backwards_compatibility_tests_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
name: k-NN Rolling-Upgrade BWC Tests
runs-on: ubuntu-latest
env:
OPENSEARCH_VERSION_ROLLING_UPGRADE: ${{ matrix.opensearch_version }}
BWC_VERSION_ROLLING_UPGRADE: ${{ matrix.bwc_version }}

steps:
- name: Checkout k-NN
Expand All @@ -70,4 +70,4 @@ jobs:
- name: Run k-NN Rolling-Upgrade BWC Tests from BWCVersion-${{ matrix.bwc_version }} to OpenSearch Version-${{ matrix.opensearch_version }}
run: |
echo "Running rolling-upgrade backwards compatibility tests ..."
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Drolling.bwctests.opensearch.version=$OPENSEARCH_VERSION_ROLLING_UPGRADE
./gradlew :qa:rolling-upgrade:testRollingUpgrade -Dtests.bwc.version=$BWC_VERSION_ROLLING_UPGRADE
6 changes: 3 additions & 3 deletions qa/rolling-upgrade/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ import org.opensearch.gradle.testclusters.StandaloneRestIntegTestTask

apply from : "$rootDir/qa/build.gradle"

String knn_bwc_version = System.getProperty("bwc.version")
String default_bwc_version = System.getProperty("bwc.version")
String knn_bwc_version = System.getProperty("tests.bwc.version", default_bwc_version)
String baseName = "knnBwcCluster-rolling"
String opensearch_version_upgraded = System.getProperty("rolling.bwctests.opensearch.version", opensearch_version)

// Creates a test cluster of previous version and loads k-NN plugin of bwcVersion
testClusters {
"${baseName}" {
testDistribution = "ARCHIVE"
versions = [knn_bwc_version, opensearch_version_upgraded]
versions = [knn_bwc_version, opensearch_version]
numberOfNodes = 3
plugin(project.tasks.zipBwcPlugin.archiveFile)
setting 'path.repo', "${buildDir}/cluster/shared/repo/${baseName}"
Expand Down

0 comments on commit 9f71ede

Please sign in to comment.