Skip to content
Snippets Groups Projects

CI: Cleanup and enhance to specify platform branch

Closed micah requested to merge micah/platform:fix_mail_deploy into master
1 file
+ 29
13
Compare changes
  • Side-by-side
  • Inline
@@ -128,18 +128,34 @@ build_from_scratch() {
@@ -128,18 +128,34 @@ build_from_scratch() {
}
}
run() {
run() {
echo "Cloning $1 repo: $2"
provider_name=$1
git clone -q --depth 1 "$2"
provider_URI=$2
cd "$1"
platform_branch=$3
git rev-parse HEAD
echo -n "Operating in the $1 directory: "
# If the third argument is set make sure we are on that platform branch
pwd
if [[ -n $platform_branch ]]
echo "Listing current node information..."
then
LEAP_CMD list
echo "Checking out $platform_branch branch of platform"
echo "Attempting a deploy..."
cd "$PLATFORMDIR"
deploy
git checkout -B "$platform_branch"
echo "Attempting to run tests..."
fi
test
 
# Setup the provider repository
 
echo "Setting up the provider repository: $provider_name by cloning $provider_URI"
 
git clone -q --depth 1 "$provider_URI" "$ROOTDIR"
 
cd "$provider_name"
 
echo -n "$provider_name repo at revision: "
 
git rev-parse HEAD
 
echo -n "Operating in the $provider_name directory: "
 
pwd
 
echo "Listing current node information..."
 
LEAP_CMD list
 
 
# Do the deployment
 
echo "Attempting a deploy..."
 
deploy
 
echo "Attempting to run tests..."
 
test
}
}
upgrade_test() {
upgrade_test() {
@@ -215,7 +231,7 @@ case "$CI_JOB_NAME" in
@@ -215,7 +231,7 @@ case "$CI_JOB_NAME" in
;;
;;
mail.bitmask.net)
mail.bitmask.net)
TAG='demomail'
TAG='demomail'
run bitmask ssh://gitolite@leap.se/bitmask
run bitmask ssh://gitolite@leap.se/bitmask master
;;
;;
demo.bitmask.net)
demo.bitmask.net)
TAG='demovpn'
TAG='demovpn'
Loading