Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow alpha/beta version in JAK servers #130

Merged
merged 1 commit into from
Jan 23, 2025
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
8 changes: 8 additions & 0 deletions jenkins/pipelines/java/local/config_android.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://packages.couchbase.com/couchbase-lite/testserver.schema.json",
"sync-gateways": [{"hostname": "192.168.89.180", "tls": true}],
"couchbase-servers": [{"hostname": "192.168.89.180"}],
"api-version": 1,
"test-servers": ["http://192.168.89.162:8080"]
}

8 changes: 8 additions & 0 deletions jenkins/pipelines/java/local/config_java.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "https://packages.couchbase.com/couchbase-lite/testserver.schema.json",
"sync-gateways": [{"hostname": "localhost", "tls": true}],
"couchbase-servers": [{"hostname": "localhost"}],
"api-version": 1,
"test-servers": ["http://localhost:8080"]
}

11 changes: 7 additions & 4 deletions jenkins/pipelines/java/local/run_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,25 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ROOT_DIR="${SCRIPT_DIR}"/../../../..

function usage() {
echo "Usage: $0 <cbl version>"
echo "Usage: $0 <cbl version> <dataset version>"
exit 1
}

if [ "$#" -ne 1 ] ; then usage; fi
if [ "$#" -ne 2 ] ; then usage; fi

CBL_VERSION="$1"
if [ -z "$CBL_VERSION" ]; then usage; fi

DATASET_VERSION="$2"
if [ -z "$DATASET_VERSION" ]; then usage; fi

cd "${ROOT_DIR}"/servers/jak
SERVER_VERSION=`cat version.txt`
cd desktop

rm -rf app/build
./gradlew jar -PcblVersion="${CBL_VERSION}" | exit 1
./gradlew jar -PcblVersion="${CBL_VERSION}" -PdatasetVersion="${DATASET_VERSION}" | exit 1

echo "==== Running Test Server $SERVER_VERSION with CBL $CBL_VERSION"
echo "==== Running Test Server $SERVER_VERSION with CBL $CBL_VERSION and dataset ${DATASET_VERSION}"
java -jar "app/build/libs/CBLTestServer-Java-Desktop-${SERVER_VERSION}_${CBL_VERSION}.jar" | exit 1

10 changes: 1 addition & 9 deletions jenkins/pipelines/java/local/run_tests.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@

rm -rf local-config.json
cp -f "../jenkins/pipelines/java/local/local-config.json" .

"test-servers": ["<url>"]
}

rm -rf venv; py3 -m venv venv; . venv/bin/activate; pip install -r requirements.txt

rm -rf http_log testserver.log; pytest -x -W ignore::DeprecationWarning --config local-config.json
rm -rf http_log testserver.log; pytest --maxfail=3 -W ignore::DeprecationWarning --config config_java.json

2 changes: 1 addition & 1 deletion servers/jak/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ext {
}

def COUCHBASE_LITE_VERSION = project.hasProperty("cblVersion") ? cblVersion : ""
if (!(COUCHBASE_LITE_VERSION =~ /^\d{1,2}\.\d{1,2}\.\d{1,2}-/)) { throw new InvalidUserDataException ("!!! Bad Couchbase version: ${COUCHBASE_LITE_VERSION}") }
if (!(COUCHBASE_LITE_VERSION =~ /^\d{1,2}\.\d{1,2}\.\d{1,2}([ab.]\d)?-/)) { throw new InvalidUserDataException ("!!! Bad Couchbase version: ${COUCHBASE_LITE_VERSION}") }

// If it is a snapshot, it is in maven local
def USE_LOCAL_MAVEN = COUCHBASE_LITE_VERSION.endsWith("SNAPSHOT")
Expand Down
2 changes: 1 addition & 1 deletion servers/jak/desktop/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ext {
OKHTTP_VERSION = '4.12.0'
}
def COUCHBASE_LITE_VERSION = project.hasProperty("cblVersion") ? cblVersion : ""
if (!(COUCHBASE_LITE_VERSION =~ /^\d{1,2}\.\d{1,2}\.\d{1,2}-/)) { throw new InvalidUserDataException ("!!! Bad Couchbase version: ${COUCHBASE_LITE_VERSION}") }
if (!(COUCHBASE_LITE_VERSION =~ /^\d{1,2}\.\d{1,2}\.\d{1,2}([ab.]\d)?-/)) { throw new InvalidUserDataException ("!!! Bad Couchbase version: ${COUCHBASE_LITE_VERSION}") }

// If it is a snapshot, it is in maven local
def USE_LOCAL_MAVEN = COUCHBASE_LITE_VERSION.endsWith("SNAPSHOT")
Expand Down
2 changes: 1 addition & 1 deletion servers/jak/webservice/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ext {
OKHTTP_VERSION = '4.12.0'
}
def COUCHBASE_LITE_VERSION = project.hasProperty("cblVersion") ? cblVersion : ""
if (!(COUCHBASE_LITE_VERSION =~ /^\d{1,2}\.\d{1,2}\.\d{1,2}-/)) { throw new InvalidUserDataException ("!!! Bad Couchbase version: ${COUCHBASE_LITE_VERSION}") }
if (!(COUCHBASE_LITE_VERSION =~ /^\d{1,2}\.\d{1,2}\.\d{1,2}([ab.]\d)?-/)) { throw new InvalidUserDataException ("!!! Bad Couchbase version: ${COUCHBASE_LITE_VERSION}") }

// If it is a snapshot, it is in maven local
def USE_LOCAL_MAVEN = COUCHBASE_LITE_VERSION.endsWith("SNAPSHOT")
Expand Down
Loading