Skip to content

Commit

Permalink
Migrate artifact hosting to cloudsmith (#561)
Browse files Browse the repository at this point in the history
## Usage and product changes

Updates artifact deployment & consumption rules to use cloudsmith
(repo.typedb.com) instead of the self-hosted sonatype repository
(repo.vaticle.com).

## Implementation
* Updates deployment & artifact consumption rules to point to Cloudsmith
and update deployment rules and repositories
* Updates `artifact_group`s to reflect the revised repository layout
* Update package import paths for TypeDBRunner
  • Loading branch information
krishnangovindraj authored Jan 14, 2024
1 parent 3841079 commit 4bfdf06
Show file tree
Hide file tree
Showing 31 changed files with 262 additions and 247 deletions.
50 changes: 26 additions & 24 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ commands:
steps:
- install-pip-requirements
- run: |
export DEPLOY_PIP_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_PIP_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_PIP_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_PIP_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //python:deploy-pip38 -- snapshot
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //python:deploy-pip39 -- snapshot
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //python:deploy-pip310 -- snapshot
Expand All @@ -121,9 +121,11 @@ commands:
- run: |
tool/test/start-core-server.sh
python3.8 -m pip install wheel
python3.8 -m pip install --extra-index-url https://repo.vaticle.com/repository/pypi-snapshot/simple typedb-driver==0.0.0+$(git rev-parse HEAD)
python3.8 -m pip install --extra-index-url https://repo.typedb.com/public/public-snapshot/python/simple typedb-driver==0.0.0+$(git rev-parse HEAD)
sleep 3
(cd python/tests/deployment/ && python3.8 -m unittest test && export TEST_SUCCESS=0 || export TEST_SUCCESS=1)
pushd python/tests/deployment/
python3.8 -m unittest test && export TEST_SUCCESS=0 || export TEST_SUCCESS=1
popd
tool/test/stop-core-server.sh
exit $TEST_SUCCESS
Expand Down Expand Up @@ -154,15 +156,15 @@ commands:
deploy-maven-jni-snapshot-unix:
steps:
- run: |
export DEPLOY_MAVEN_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_MAVEN_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //java:deploy-maven-jni -- snapshot
deploy-maven-snapshot-unix:
steps:
- run: |
export DEPLOY_MAVEN_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_MAVEN_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //java:deploy-maven -- snapshot
test-maven-snapshot-unix:
Expand All @@ -177,15 +179,15 @@ commands:
deploy-maven-jni-release-unix:
steps:
- run: |
export DEPLOY_MAVEN_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_MAVEN_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(cat VERSION) //java:deploy-maven-jni --compilation_mode=opt -- release
deploy-maven-release-unix:
steps:
- run: |
export DEPLOY_MAVEN_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_MAVEN_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_MAVEN_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(cat VERSION) //java:deploy-maven --compilation_mode=opt -- release
######################
Expand All @@ -195,8 +197,8 @@ commands:
deploy-clib-snapshot-unix:
steps:
- run: |
export DEPLOY_ARTIFACT_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //c:deploy-clib-driver --compilation_mode=opt -- snapshot
test-clib-assembly-linux:
Expand Down Expand Up @@ -248,8 +250,8 @@ commands:
deploy-clib-release-unix:
steps:
- run: |
export DEPLOY_ARTIFACT_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(cat VERSION) //c:deploy-clib-driver --compilation_mode=opt -- release
########################
Expand All @@ -259,8 +261,8 @@ commands:
deploy-cpp-snapshot-unix:
steps:
- run: |
export DEPLOY_ARTIFACT_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //cpp:deploy-cpp-driver --compilation_mode=opt -- snapshot
test-cpp-assembly-linux:
Expand Down Expand Up @@ -312,8 +314,8 @@ commands:
deploy-cpp-release-unix:
steps:
- run: |
export DEPLOY_ARTIFACT_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_ARTIFACT_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_ARTIFACT_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --jobs=8 --define version=$(cat VERSION) //cpp:deploy-cpp-driver --compilation_mode=opt -- release
#########################
Expand All @@ -323,7 +325,7 @@ commands:
deploy-crate-snapshot-unix:
steps:
- run: |
export DEPLOY_CRATE_TOKEN=$REPO_VATICLE_CRATES_TOKEN
export DEPLOY_CRATE_TOKEN=$REPO_TYPEDB_CRATES_TOKEN
bazel run --jobs=8 --define version=$(git rev-parse HEAD) //rust:deploy_crate -- snapshot
deploy-crate-release-unix:
Expand All @@ -339,16 +341,16 @@ commands:
deploy-npm-snapshot-unix:
steps:
- run: |
export DEPLOY_NPM_USERNAME=$REPO_VATICLE_USERNAME
export DEPLOY_NPM_PASSWORD=$REPO_VATICLE_PASSWORD
export DEPLOY_NPM_USERNAME=$REPO_TYPEDB_USERNAME
export DEPLOY_NPM_PASSWORD=$REPO_TYPEDB_PASSWORD
bazel run --define version=$(git rev-parse HEAD) //nodejs:deploy-npm -- snapshot
test-npm-snapshot-unix:
steps:
- run: |
tool/test/start-core-server.sh
cd nodejs/test/deployment/
npm install https://repo.vaticle.com/repository/npm-snapshot-group/typedb-driver/-/typedb-driver-0.0.0-$FACTORY_COMMIT.tgz
npm install --registry https://npm.cloudsmith.io/typedb/public-snapshot/ "typedb-driver@0.0.0-$FACTORY_COMMIT"
sudo -H npm install jest --global
jest --detectOpenHandles application.test.js && export TEST_SUCCESS=0 || export TEST_SUCCESS=1
cd -
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows/clib/deploy_release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REM by Chocolatey in prepare.bat is accessible
CALL refreshenv

ECHO Building and deploying windows package...
SET DEPLOY_ARTIFACT_USERNAME=%REPO_VATICLE_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_VATICLE_PASSWORD%
SET DEPLOY_ARTIFACT_USERNAME=%REPO_TYPEDB_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_TYPEDB_PASSWORD%

SET /p VER=<VERSION
bazel --output_user_root=C:\bazel run --verbose_failures --define version=%VER% //c:deploy-windows-x86_64-zip --compilation_mode=opt -- release
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows/clib/deploy_snapshot.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REM by Chocolatey in prepare.bat is accessible
CALL refreshenv

ECHO Building and deploying windows package...
SET DEPLOY_ARTIFACT_USERNAME=%REPO_VATICLE_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_VATICLE_PASSWORD%
SET DEPLOY_ARTIFACT_USERNAME=%REPO_TYPEDB_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_TYPEDB_PASSWORD%

git rev-parse HEAD > version_snapshot.txt
set /p VER=<version_snapshot.txt
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows/cpp/deploy_release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REM by Chocolatey in prepare.bat is accessible
CALL refreshenv

ECHO Building and deploying windows package...
SET DEPLOY_ARTIFACT_USERNAME=%REPO_VATICLE_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_VATICLE_PASSWORD%
SET DEPLOY_ARTIFACT_USERNAME=%REPO_TYPEDB_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_TYPEDB_PASSWORD%

SET /p VER=<VERSION
bazel --output_user_root=C:\bazel run --verbose_failures --define version=%VER% //cpp:deploy-windows-x86_64-zip --compilation_mode=opt -- release
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows/cpp/deploy_snapshot.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REM by Chocolatey in prepare.bat is accessible
CALL refreshenv

ECHO Building and deploying windows package...
SET DEPLOY_ARTIFACT_USERNAME=%REPO_VATICLE_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_VATICLE_PASSWORD%
SET DEPLOY_ARTIFACT_USERNAME=%REPO_TYPEDB_USERNAME%
SET DEPLOY_ARTIFACT_PASSWORD=%REPO_TYPEDB_PASSWORD%

git rev-parse HEAD > version_snapshot.txt
set /p VER=<version_snapshot.txt
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows/java/deploy_release.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REM by Chocolatey in prepare.bat is accessible
CALL refreshenv

ECHO Building and deploying windows package...
SET DEPLOY_MAVEN_USERNAME=%REPO_VATICLE_USERNAME%
SET DEPLOY_MAVEN_PASSWORD=%REPO_VATICLE_PASSWORD%
SET DEPLOY_MAVEN_USERNAME=%REPO_TYPEDB_USERNAME%
SET DEPLOY_MAVEN_PASSWORD=%REPO_TYPEDB_PASSWORD%

SET /p VER=<VERSION
bazel --output_user_root=C:/bazel run --verbose_failures --define version=%VER% //java:deploy-maven-jni --compilation_mode=opt -- release
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows/java/deploy_snapshot.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REM by Chocolatey in prepare.bat is accessible
CALL refreshenv

ECHO Building and deploying windows package...
SET DEPLOY_MAVEN_USERNAME=%REPO_VATICLE_USERNAME%
SET DEPLOY_MAVEN_PASSWORD=%REPO_VATICLE_PASSWORD%
SET DEPLOY_MAVEN_USERNAME=%REPO_TYPEDB_USERNAME%
SET DEPLOY_MAVEN_PASSWORD=%REPO_TYPEDB_PASSWORD%

git rev-parse HEAD > version_snapshot.txt
set /p VER=<version_snapshot.txt
Expand Down
4 changes: 2 additions & 2 deletions .circleci/windows/python/deploy_snapshot.bat
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ REM by Chocolatey in prepare.bat is accessible
CALL refreshenv

ECHO Building and deploying windows package...
SET DEPLOY_PIP_USERNAME=%REPO_VATICLE_USERNAME%
SET DEPLOY_PIP_PASSWORD=%REPO_VATICLE_PASSWORD%
SET DEPLOY_PIP_USERNAME=%REPO_TYPEDB_USERNAME%
SET DEPLOY_PIP_PASSWORD=%REPO_TYPEDB_PASSWORD%
python.exe -m pip install twine==3.3.0 importlib-metadata==3.4.0
git rev-parse HEAD > version_temp.txt
set /p VER=<version_temp.txt
Expand Down
2 changes: 1 addition & 1 deletion .circleci/windows/python/test_deploy_snapshot.bat
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RD /S /Q typedb-server-windows
powershell -Command "Move-Item -Path typedb-server-windows-* -Destination typedb-server-windows"
START /B "" typedb-server-windows\typedb server

python3 -m pip install --extra-index-url https://repo.vaticle.com/repository/pypi-snapshot/simple typedb-driver==0.0.0+%VER%
python3 -m pip install --extra-index-url https://repo.typedb.com/public/public-snapshot/python/simple typedb-driver==0.0.0+%VER%
cd python/tests/deployment
python3 -m unittest test
SET IS_ERROR=%ERRORLEVEL%
Expand Down
Loading

0 comments on commit 4bfdf06

Please sign in to comment.