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
1 change: 0 additions & 1 deletion environment/aws/start_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def topology_has_aws_resources(topology: TopologyConfig) -> bool:
Returns:
bool: True if there are AWS resources, False otherwise.
"""
print(topology.total_sgw_count)
return (
topology.total_sgw_count > 0
or topology.total_cbs_count > 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ def _download_cbl(self):

def build(self):
self._download_cbl()
self._copy_dataset()
header("Building")
env = os.environ.copy()
env["LANG"] = "en_US.UTF-8"
Expand Down Expand Up @@ -377,6 +378,7 @@ def build(self) -> None:
Build the C test server.
"""
self._download_cbl()
self._copy_dataset()
gradle_path = C_TEST_SERVER_DIR / "platforms" / "android" / "gradlew"
if platform.system() == "Windows":
gradle_path = gradle_path.with_suffix(".bat")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,12 @@ def platform(self) -> str:
"""
return "jak_webservice"

@property
def latestbuilds_path(self) -> str:
raise NotImplementedError(
"Please implement the latestbuilds path for webservice"
)

def create_bridge(self):
return JettyBridge(self.version, self.dataset_version)

Expand Down
Empty file modified jenkins/pipelines/c/run_test.sh
100644 → 100755
Empty file.
2 changes: 0 additions & 2 deletions jenkins/pipelines/c/teardown.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
Import-Module $PSScriptRoot/prepare_env.psm1 -Force

$env:PYTHONPATH = "$PSScriptRoot\..\..\..\"
Push-Location $PSScriptRoot\..\..\..\environment\aws
python -m venv venv
Expand Down
Empty file modified jenkins/pipelines/c/teardown.sh
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "../../../../environment/aws/topology_setup/topology_schema.json",
"test_servers": [
{
"platform": "dotnet_android",
"platform": "c_android",
"cbl_version": "{{version}}",
"dataset_version": "{{dataset_version}}",
"location": "1BCACS00001MX3"
Expand Down
8 changes: 4 additions & 4 deletions jenkins/pipelines/dotnet/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ pipeline {
timeout(time: 5, unit: 'MINUTES') {
pwsh 'jenkins\\pipelines\\dotnet\\teardown.ps1'
}
archiveArtifacts artifacts: 'tests\\session.log', fingerprint: true
archiveArtifacts artifacts: 'tests\\dev_e2e\\session.log', fingerprint: true
}
}
}
Expand All @@ -66,7 +66,7 @@ pipeline {
timeout(time: 5, unit: 'MINUTES') {
sh 'jenkins/pipelines/dotnet/teardown.sh'
}
archiveArtifacts artifacts: 'tests/session.log', fingerprint: true
archiveArtifacts artifacts: 'tests/dev_e2e/session.log', fingerprint: true
}
}
}
Expand All @@ -93,7 +93,7 @@ pipeline {
timeout(time: 5, unit: 'MINUTES') {
sh 'jenkins/pipelines/dotnet/teardown.sh'
}
archiveArtifacts artifacts: 'tests/session.log', fingerprint: true
archiveArtifacts artifacts: 'tests/dev_e2e/session.log', fingerprint: true
}
}
}
Expand All @@ -112,7 +112,7 @@ pipeline {
timeout(time: 5, unit: 'MINUTES') {
sh 'jenkins/pipelines/dotnet/teardown.sh'
}
archiveArtifacts artifacts: 'tests/session.log', fingerprint: true
archiveArtifacts artifacts: 'tests/dev_e2e/session.log', fingerprint: true
}
}
}
Expand Down
12 changes: 6 additions & 6 deletions jenkins/pipelines/java/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pipeline {
echo "=== Run OSX Desktop Tests"
timeout(time: 120, unit: 'MINUTES') {
sh """
jenkins/pipelines/java/desktop/run_test.sh "${params.CBL_VERSION}"-"${params.CBL_BUILD}" "${params.CBL_DATASET_VERSION}" macos "${params.SGW_VERSION}" ~/.ssh/jborden.pem
jenkins/pipelines/java/desktop/run_test.sh ${params.CBL_VERSION}-${params.CBL_BUILD} ${params.CBL_DATASET_VERSION} ${params.SGW_VERSION} ~/.ssh/jborden.pem
"""
}
echo "=== OSX Desktop Tests Complete"
Expand All @@ -63,7 +63,7 @@ pipeline {
echo "=== Run Windows Desktop Tests"
timeout(time: 120, unit: 'MINUTES') {
pwsh """
jenkins\\pipelines\\java\\desktop\\run_test.ps1 -Version "${params.CBL_VERSION}"-"${params.CBL_BUILD}" -DatasetVersion "${params.CBL_DATASET_VERSION}" -SgwVersion "${params.SGW_VERSION}" -PrivateKeyPath C:\\Users\\mob-e\\.ssh\\jborden.pem
jenkins\\pipelines\\java\\desktop\\run_test.ps1 -Version ${params.CBL_VERSION}-${params.CBL_BUILD} -DatasetVersion ${params.CBL_DATASET_VERSION} -SgwVersion ${params.SGW_VERSION} -PrivateKeyPath C:\\Users\\mob-e\\.ssh\\jborden.pem
"""
}
echo "=== Windows Desktop Tests Complete"
Expand All @@ -88,7 +88,7 @@ pipeline {
echo "=== Run Linux Desktop Tests"
timeout(time: 120, unit: 'MINUTES') {
sh """
jenkins/pipelines/java/desktop/run_test.sh "${params.CBL_VERSION}"-"${params.CBL_BUILD}" "${params.CBL_DATASET_VERSION}" "${params.SGW_VERSION}" ~/.ssh/jborden.pem
jenkins/pipelines/java/desktop/run_test.sh ${params.CBL_VERSION}-${params.CBL_BUILD} ${params.CBL_DATASET_VERSION} ${params.SGW_VERSION} ~/.ssh/jborden.pem
"""
}
echo "=== Linux Desktop Tests Complete"
Expand All @@ -115,7 +115,7 @@ pipeline {
echo "=== Run OSX Web Service Tests"
timeout(time: 120, unit: 'MINUTES') {
sh """
jenkins/pipelines/java/webservice/run_test.sh "${params.CBL_VERSION}"-"${params.CBL_BUILD}" "${params.CBL_DATASET_VERSION}" macos "${params.SGW_VERSION}" ~/.ssh/jborden.pem
jenkins/pipelines/java/webservice/run_test.sh ${params.CBL_VERSION}-${params.CBL_BUILD} ${params.CBL_DATASET_VERSION} ${params.SGW_VERSION} ~/.ssh/jborden.pem
"""
}
echo "=== OSX Web Service Tests Complete"
Expand All @@ -142,7 +142,7 @@ pipeline {
echo "=== Run Windows Web Service Tests"
timeout(time: 120, unit: 'MINUTES') {
pwsh """
jenkins\\pipelines\\java\\webservice\\run_test.ps1 -Version "${params.CBL_VERSION}"-"${params.CBL_BUILD}" -DatasetVersion "${params.CBL_DATASET_VERSION}" -SgwVersion "${params.SGW_VERSION}" -PrivateKeyPath C:\\Users\\mob-e\\.ssh\\jborden.pem
jenkins\\pipelines\\java\\webservice\\run_test.ps1 -Version ${params.CBL_VERSION}-${params.CBL_BUILD} -DatasetVersion ${params.CBL_DATASET_VERSION} -SgwVersion ${params.SGW_VERSION} -PrivateKeyPath C:\\Users\\mob-e\\.ssh\\jborden.pem
"""
}
echo "=== Windows Web Service Tests Complete"
Expand All @@ -169,7 +169,7 @@ pipeline {
echo "=== Run Linux Web Service Tests"
timeout(time: 120, unit: 'MINUTES') {
sh """
jenkins/pipelines/java/webservice/run_test.sh "${params.CBL_VERSION}"-"${params.CBL_BUILD}" "${params.CBL_DATASET_VERSION}" "${params.SGW_VERSION}" ~/.ssh/jborden.pem
jenkins/pipelines/java/webservice/run_test.sh ${params.CBL_VERSION}-${params.CBL_BUILD} ${params.CBL_DATASET_VERSION} ${params.SGW_VERSION} ~/.ssh/jborden.pem
"""
}
echo "=== Linux Web Service Tests Complete"
Expand Down
6 changes: 3 additions & 3 deletions jenkins/pipelines/java/desktop/run_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ $ErrorActionPreference = "Stop"

python -m venv venv
.\venv\Scripts\activate
pip install -r $PSScriptRoot\..\..\..\environment\aws\requirements.txt
$python_args = @("windows", $Version, $DatasetVersion, $SgwVersion)
pip install -r $PSScriptRoot\..\..\..\..\environment\aws\requirements.txt
$python_args = @($Version, $DatasetVersion, $SgwVersion)
if ($null -ne $PrivateKeyPath) {
$python_args += "--private_key"
$python_args += $PrivateKeyPath
}

python $PSScriptRoot\setup_test.py @python_args

Push-Location $PSScriptRoot\..\..\..\tests\dev_e2e
Push-Location $PSScriptRoot\..\..\..\..\tests\dev_e2e
pip install -r requirements.txt
pytest --maxfail=7 -W ignore::DeprecationWarning --config config.json
$saved_exit = $LASTEXITCODE
Expand Down
18 changes: 8 additions & 10 deletions jenkins/pipelines/java/desktop/run_test.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,33 @@ function usage() {
echo "Usage: $0 <version> <dataset_version> <platform> <sgw_version> [private_key_path]"
echo "version: CBL version (e.g. 3.2.1-2)"
echo "dataset_version: Version of the Couchbase Lite datasets to use"
echo "platform: The .NET platform to build (e.g. ios)"
echo "sgw_version: Version of Sync Gateway to download and use"
echo "private_key_path: Path to the private key to use for SSH connections"
}

if [ $# -lt 4 ]; then
if [ $# -lt 3 ]; then
usage
exit 1
fi

if [ $# -gt 4 ]; then
private_key_path=$5
if [ $# -gt 3 ]; then
private_key_path=$4
fi

cbl_version=$1
dataset_version=$2
platform=$3
sgw_version=$4
sgw_version=$3

python3 -m venv venv
source venv/bin/activate
pip install -r $SCRIPT_DIR/../../../environment/aws/requirements.txt
pip install -r $SCRIPT_DIR/../../../../environment/aws/requirements.txt
if [ -n "$private_key_path" ]; then
python3 $SCRIPT_DIR/setup_test.py $platform $cbl_version $dataset_version $sgw_version --private_key $private_key_path
python3 $SCRIPT_DIR/setup_test.py $cbl_version $dataset_version $sgw_version --private_key $private_key_path
else
python3 $SCRIPT_DIR/setup_test.py $platform $cbl_version $dataset_version $sgw_version
python3 $SCRIPT_DIR/setup_test.py $cbl_version $dataset_version $sgw_version
fi

pushd $SCRIPT_DIR/../../../tests/dev_e2e
pushd $SCRIPT_DIR/../../../../tests/dev_e2e
pip install -r requirements.txt
pytest --maxfail=7 -W ignore::DeprecationWarning --config config.json
deactivate
6 changes: 2 additions & 4 deletions jenkins/pipelines/java/desktop/setup_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


@click.command()
@click.argument("platform")
@click.argument("cbl_version")
@click.argument("dataset_version")
@click.argument("sgw_version")
Expand All @@ -28,7 +27,6 @@
help="The private key to use for the SSH connection (if not default)",
)
def cli_entry(
platform: str,
cbl_version: str,
dataset_version: str,
sgw_version: str,
Expand All @@ -38,9 +36,9 @@ def cli_entry(
cbl_version,
dataset_version,
sgw_version,
SCRIPT_DIR / "topologies" / f"topology_single_{platform}.json",
SCRIPT_DIR / "topology_single_host.json",
SCRIPT_DIR / "config_java_desktop.json",
f"jak_{platform}_desktop",
"jak_desktop",
private_key,
)

Expand Down
Empty file modified jenkins/pipelines/java/desktop/teardown.sh
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions jenkins/pipelines/java/webservice/run_test.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ $ErrorActionPreference = "Stop"

python -m venv venv
.\venv\Scripts\activate
pip install -r $PSScriptRoot\..\..\..\environment\aws\requirements.txt
$python_args = @("windows", $Version, $DatasetVersion, $SgwVersion)
pip install -r $PSScriptRoot\..\..\..\..\environment\aws\requirements.txt
$python_args = @($Version, $DatasetVersion, $SgwVersion)
if ($null -ne $PrivateKeyPath) {
$python_args += "--private_key"
$python_args += $PrivateKeyPath
}

python $PSScriptRoot\setup_test.py @python_args

Push-Location $PSScriptRoot\..\..\..\tests\dev_e2e
Push-Location $PSScriptRoot\..\..\..\..\tests\dev_e2e
pip install -r requirements.txt
pytest --maxfail=7 -W ignore::DeprecationWarning --config config.json
$saved_exit = $LASTEXITCODE
Expand Down
20 changes: 9 additions & 11 deletions jenkins/pipelines/java/webservice/run_test.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,36 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )

function usage() {
echo "Usage: $0 <version> <dataset_version> <platform> <sgw_version> [private_key_path]"
echo "Usage: $0 <version> <dataset_version> <sgw_version> [private_key_path]"
echo "version: CBL version (e.g. 3.2.1-2)"
echo "dataset_version: Version of the Couchbase Lite datasets to use"
echo "platform: The .NET platform to build (e.g. ios)"
echo "sgw_version: Version of Sync Gateway to download and use"
echo "private_key_path: Path to the private key to use for SSH connections"
}

if [ $# -lt 4 ]; then
if [ $# -lt 3 ]; then
usage
exit 1
fi

if [ $# -gt 4 ]; then
private_key_path=$5
if [ $# -gt 3 ]; then
private_key_path=$4
fi

cbl_version=$1
dataset_version=$2
platform=$3
sgw_version=$4
sgw_version=$3

python3 -m venv venv
source venv/bin/activate
pip install -r $SCRIPT_DIR/../../../environment/aws/requirements.txt
pip install -r $SCRIPT_DIR/../../../../environment/aws/requirements.txt
if [ -n "$private_key_path" ]; then
python3 $SCRIPT_DIR/setup_test.py $platform $cbl_version $dataset_version $sgw_version --private_key $private_key_path
python3 $SCRIPT_DIR/setup_test.py $cbl_version $dataset_version $sgw_version --private_key $private_key_path
else
python3 $SCRIPT_DIR/setup_test.py $platform $cbl_version $dataset_version $sgw_version
python3 $SCRIPT_DIR/setup_test.py $cbl_version $dataset_version $sgw_version
fi

pushd $SCRIPT_DIR/../../../tests/dev_e2e
pushd $SCRIPT_DIR/../../../../tests/dev_e2e
pip install -r requirements.txt
pytest --maxfail=7 -W ignore::DeprecationWarning --config config.json
deactivate
6 changes: 2 additions & 4 deletions jenkins/pipelines/java/webservice/setup_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@


@click.command()
@click.argument("platform")
@click.argument("cbl_version")
@click.argument("dataset_version")
@click.argument("sgw_version")
Expand All @@ -28,7 +27,6 @@
help="The private key to use for the SSH connection (if not default)",
)
def cli_entry(
platform: str,
cbl_version: str,
dataset_version: str,
sgw_version: str,
Expand All @@ -38,9 +36,9 @@ def cli_entry(
cbl_version,
dataset_version,
sgw_version,
SCRIPT_DIR / "topologies" / f"topology_single_{platform}.json",
SCRIPT_DIR / "topology_single_host.json",
SCRIPT_DIR / "config_java_webservice.json",
f"jak_{platform}_webservice",
"jak_webservice",
private_key,
)

Expand Down
Empty file modified jenkins/pipelines/java/webservice/teardown.sh
100644 → 100755
Empty file.
20 changes: 19 additions & 1 deletion servers/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if(NOT DEFINED CBL_VERSION)
message(FATAL_ERROR "Please pass -DCBL_VERSION to indicate which version of Couchbase Lite you will use")
endif()

find_package(CouchbaseLite REQUIRED VERSION ${CBL_VERSION} PATHS lib/libcblite-${CBL_VERSION} NO_DEFAULT_PATH)
find_package(CouchbaseLite REQUIRED EXACT VERSION ${CBL_VERSION} PATHS lib/libcblite-${CBL_VERSION} lib/libcblite NO_DEFAULT_PATH)

if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path")
Expand Down Expand Up @@ -127,3 +127,21 @@ install(
TARGETS testserver
RUNTIME DESTINATION bin
)

get_target_property(CBLITE_DLL_LOCATION cblite IMPORTED_LOCATION_MINSIZEREL)
get_filename_component(CBLITE_PARENT_DIR "${CBLITE_DLL_LOCATION}" DIRECTORY)
file(GLOB CBLITE_FILES "${CBLITE_PARENT_DIR}/*")
install(
FILES ${CBLITE_FILES}
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
)

install(
DIRECTORY assets
DESTINATION ${CMAKE_INSTALL_PREFIX}
FILES_MATCHING
PATTERN "*"
PATTERN ".gitkeep" EXCLUDE
)


Loading
Loading