Skip to content
Snippets Groups Projects
Commit d85645cf authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Merge branch 'feature/Jojo/DynamicIP' into 'release'

DynamicIP Feature Integration Test

See merge request elixxir/integration!77
parents 7d64411c 84ec0a1f
Branches
No related tags found
No related merge requests found
......@@ -20,13 +20,13 @@ variables:
DOCKER_IMAGE: sydney112/cuda-go:latest
# See https://docs.gitlab.com/ee/api/jobs.html#download-a-single-artifact-file-from-specific-tag-or-branch
REPOS_API: https://gitlab.com/api/v4/projects/elixxir%2F
SERVER_URL: ${REPOS_API}server/jobs/artifacts/$SERVER_ID/raw/release/server.linux64?job=build
SERVER_GPU_URL: ${REPOS_API}server/jobs/artifacts/$SERVER_ID/raw/release/server-cuda.linux64?job=build
GPULIB_URL: ${REPOS_API}server/jobs/artifacts/$SERVER_ID/raw/gpumaths/cgbnBindings/powm/libpowmosm75.so?job=build
CLIENT_URL: ${REPOS_API}client/jobs/artifacts/$CLIENT_ID/raw/release/client.linux64?job=build
REGISTRATION_URL: ${REPOS_API}registration/jobs/artifacts/$REGISTRATION_ID/raw/release/registration.linux64?job=build
UDB_URL: ${REPOS_API}user-discovery-bot/jobs/artifacts/$UDB_ID/raw/release/udb.linux64?job=build
GATEWAY_URL: ${REPOS_API}gateway/jobs/artifacts/$GATEWAY_ID/raw/release/gateway.linux64?job=build
SERVER_URL: ""
SERVER_GPU_URL: ""
GPULIB_URL: ""
CLIENT_URL: ""
REGISTRATION_URL: ""
UDB_URL: ""
GATEWAY_URL: ""
DEFAULTBRANCH: "release"
before_script:
......@@ -52,30 +52,10 @@ installbinaries:
script:
- git clean -ffdx
- mkdir -p ~/.elixxir
- mkdir -p bin
- cd bin
- "DOWNLOADS=\"$SERVER_URL $CLIENT_URL $REGISTRATION_URL $UDB_URL $GATEWAY_URL $SERVER_GPU_URL $GPULIB_URL\""
- >
if [ "$CI_BUILD_REF_NAME" == "master" ]; then
DOWNLOADS=$(echo $DOWNLOADS | sed "s/artifacts\/$DEFAULTBRANCH\/raw/artifacts\/master\/raw/g")
fi
- >
for D in $DOWNLOADS; do
echo $D
curl -f -O -s -L -H "PRIVATE-TOKEN: $PATKEY" $D
done
- ls -lha
- mv server.linux64?job=build server
- mv server-cuda.linux64?job=build server-cuda
- mv client.linux64?job=build client
- mv udb.linux64?job=build udb
- mv registration.linux64?job=build permissioning
- mv gateway.linux64?job=build gateway
- mv libpowmosm75.so?job=build libpowmosm75.so
- ./download_cmix_binaries.sh
- mkdir -p /opt/elixxir/lib
- cp libpowmosm75.so /opt/elixxir/lib/
- cp bin/libpowmosm75.so /opt/elixxir/lib/
- "chmod +x *"
- cd ..
- bin/server version
- bin/server-cuda version
- bin/client --version || bin/client version
......
#!/usr/bin/env bash
set -x
# Get platform parameter
if [[ $1 == "l" ]] ||[[ $1 == "linux" ]] || [[ -z $1 ]]; then
BIN=".linux64?job=build"
......@@ -15,42 +13,94 @@ else
fi
# Set up the URL for downloading the binaries
PRIVATEGRITY_REPOS="https://gitlab.com/api/v4/projects/elixxir%2F"
MASTER_URL_FRAG="jobs/artifacts/release/raw/release"
# Get URLs for artifacts from all relevant repos
UDB_URL="${PRIVATEGRITY_REPOS}user-discovery-bot/$MASTER_URL_FRAG/udb$BIN"
SERVER_URL="${PRIVATEGRITY_REPOS}server/$MASTER_URL_FRAG/server$BIN"
GW_URL="${PRIVATEGRITY_REPOS}gateway/$MASTER_URL_FRAG/gateway$BIN"
PERMISSIONING_URL="${PRIVATEGRITY_REPOS}registration/$MASTER_URL_FRAG/registration$BIN"
CLIENT_URL="${PRIVATEGRITY_REPOS}client/$MASTER_URL_FRAG/client$BIN"
DEFAULTBRANCH=${DEFAULTBRANCH:="release"}
REPOS_API=${REPOS_API:="https://gitlab.com/api/v4/projects/elixxir%2F"}
# Set up the gitlab access token
PATKEY="rBxQ6BvKP-eFxxeM3Ugm"
PATKEY=${PATKEY:="rBxQ6BvKP-eFxxeM3Ugm"}
# Make the binaries directory
download_path="$(pwd)/bin"
mkdir -p "$download_path"
# Delete old binaries
rm $download_path/*
# If we are on a feature branch, add it to the eval list
FBRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ "$CI_BUILD_REF_NAME" != "" ]]; then
FBRANCH=$CI_BUILD_REF_NAME
fi
FBRANCH=$(echo $FBRANCH | grep feature)
# Also check for the branch name without the "feature" on it.
FBRANCH2=$(echo $FBRANCH | sed 's/feature\///g')
echo "Checking for binaries at $FBRANCH $FBRANCH2 $DEFAULTBRANCH..."
echo "(Note: if you forced a branch, that is checked first!)"
for BRANCH in $(echo "forcedbranch" $FBRANCH $FBRANCH2 $DEFAULTBRANCH); do
echo "Attempting downloads from: $BRANCH"
BRANCH_URL=${BRANCH_URL:="jobs/artifacts/$BRANCH/raw/release"}
# Get URLs for artifacts from all relevant repos
UDB_URL=${UDB_URL:="${REPOS_API}user-discovery-bot/$BRANCH_URL/udb$BIN"}
SERVER_URL=${SERVER_URL:="${REPOS_API}server/$BRANCH_URL/server$BIN"}
GW_URL=${GW_URL:="${REPOS_API}gateway/$BRANCH_URL/gateway$BIN"}
PERMISSIONING_URL=${PERMISSIONING_URL:="${REPOS_API}registration/$BRANCH_URL/registration$BIN"}
CLIENT_URL=${CLIENT_URL:="${REPOS_API}client/$BRANCH_URL/client$BIN"}
SERVER_GPU_URL=${SERVER_GPU_URL:="${REPOS_API}server/$BRANCH_URL/server-cuda.linux64?job=build"}
GPULIB_URL=${GPULIB_URL:="${REPOS_API}server/$BRANCH_URL/libpowmosm75.so?job=build"}
set -x
# Silently download the UDB binary to the provisioning directory
if [ ! -f $download_path/udb ] && [[ "$UDB_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $PATKEY" -o "$download_path/udb" ${UDB_URL}
fi
# Silently download the Server binary to the provisioning directory
if [ ! -f $download_path/server ] && [[ "$SERVER_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $PATKEY" -o "$download_path/server" ${SERVER_URL}
fi
# Silently download the Gateway binary to the provisioning directory
if [ ! -f $download_path/gateway ] && [[ "$GW_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $PATKEY" -o "$download_path/gateway" ${GW_URL}
fi
# Silently download the permissioning binary to the provisioning directory
if [ ! -f $download_path/permissioning ] && [[ "$PERMISSIONING_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $PATKEY" -o "$download_path/permissioning" ${PERMISSIONING_URL}
fi
# Silently download the permissioning binary to the provisioning directory
if [ ! -f $download_path/client ] && [[ "$CLIENT_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $PATKEY" -o "$download_path/client" ${CLIENT_URL}
fi
# Silently download the Server binary to the provisioning directory
if [ ! -f $download_path/server-cuda ] && [[ "$SERVER_GPU_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $PATKEY" -o "$download_path/server-cuda" ${SERVER_GPU_URL}
fi
# Silently download the GPU Library to the provisioning directory
if [ ! -f $download_path/libpowmosm75.so ] && [[ "$GPULIB_URL" != *"forcedbranch"* ]]; then
curl -s -f -L -H "PRIVATE-TOKEN: $PATKEY" -o "$download_path/libpowmosm75.so" ${GPULIB_URL}
fi
set +x
unset BRANCH_URL
unset UDB_URL
unset SERVER_URL
unset GW_URL
unset PERMISSIONING_URL
unset CLIENT_URL
unset SERVER_GPU_URL
unset GPULIB_URL
done
# Make binaries executable
chmod +x "$download_path"/*
chmod +x "$download_path"/[^l]*
file "$download_path"/*
echo "If you see HTML or anything but linux binaries above, something is messed up!"
echo "If you see HTML or anything but linux/mac binaries above, something is messed up!"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment