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

Merge branch 'branchEnvVariables' into 'master'

Add ability to set project branches individually or as a group via

See merge request !33
parents a5740147 de7db2ac
No related branches found
No related tags found
No related merge requests found
......@@ -20,12 +20,11 @@ variables:
DOCKER_IMAGE: bmastc/golang-glide: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
DL_URL_FRAG: jobs/artifacts/master/raw/release
SERVER_URL: ${REPOS_API}server/$DL_URL_FRAG/server.linux64?job=build
CLIENT_URL: ${REPOS_API}client/$DL_URL_FRAG/client.linux64?job=build
REGISTRATION_URL: ${REPOS_API}registration/$DL_URL_FRAG/registration.linux64?job=build
UDB_URL: ${REPOS_API}user-discovery-bot/$DL_URL_FRAG/udb.linux64?job=build
GATEWAY_URL: ${REPOS_API}gateway/$DL_URL_FRAG/gateway.linux64?job=build
SERVER_URL: ${REPOS_API}server/jobs/artifacts/$SERVER_ID/raw/release/server.linux64?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
before_script:
##
......
#!/bin/bash
# This intended for updating the tested repos and their dependencies to the
# latest versions before running the integration test.
# latest versions before running the integration test. All runtime options are
# set via environemnt variables:
# defaultBranch sets branch to use for all projects
# clientBranch sets branch to use for the client repository
# serverBranch sets branch to use for the server repository
# gatewayBranch sets branch to use for the gateway repository
# udbBranch sets branch to use for the user-discovery-bot repository
# regBranch sets branch to use for the registration repository
# Default branch to use when no explicit project branch is set. If not set, then
# it defaults to "master".
default="${defaultBranch-"master"}"
# Array of project names.
project_arr=(
client
server
gateway
user-discovery-bot
registration
)
# Array of each project's branch. If a branch is not explicitly set via an
# environemnt variable, then it defaults to defaultBranch.
branch_arr=(
"${clientBranch-$default}"
"${serverBranch-$default}"
"${gatewayBranch-$default}"
"${udbBranch-$default}"
"${regBranch-$default}"
)
update() {
git stash
git clean -ffdx
git checkout master
git checkout "$1"
git pull
glide cc && glide up
glide cache-clear && glide update
}
for DIR in client server gateway user-discovery-bot registration; do
echo $DIR
pushd $GOPATH/src/gitlab.com/elixxir/client
update
for ((i=0; i<${#project_arr[@]}; ++i)); do
printf "\n%s\n" "${project_arr[i]}"
pushd "$GOPATH"/src/gitlab.com/elixxir/client || exit
update "${branch_arr[i]}"
go test ./...
popd
popd || exit
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment