-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
02b3350
commit 6595eb2
Showing
8 changed files
with
258 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/bin/bash | ||
|
||
# runs command from parameters and exits with the eoror code of the command | ||
# if it fails | ||
function successOrExit { | ||
"$@" | ||
local status=$? | ||
if [ $status -ne 0 ]; then | ||
echo "$1 exited with error: $status" | ||
exit $status | ||
fi | ||
} | ||
|
||
test $1 && MLBUILD_USER=$1 | ||
test $2 && MLBUILD_PASSWORD=$2 | ||
test $3 && ML_VERSION=$3 | ||
|
||
suffix=$(sed -e 's#.*\.\(\)#\1#' <<< $ML_VERSION) | ||
if [[ $suffix = 'nightly' ]]; then | ||
# find today | ||
day=$(date +"%Y%m%d") | ||
|
||
# if the user passed a day string as a param then use it instead | ||
test $4 && day=$4 | ||
# make a version number out of the date | ||
ver="10.0-$day" | ||
|
||
echo "********* Downloading MarkLogic nightly $ver" | ||
|
||
# fetch/install ML nightly | ||
fname="MarkLogic-$ver.x86_64.rpm" | ||
|
||
url="https://root.marklogic.com/nightly/builds/linux64-rh7/rh7v-10-tst-1.marklogic.com/HEAD/pkgs.$day/$fname" | ||
|
||
status=$(curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD --head --write-out %{http_code} --silent --output /dev/null $url) | ||
if [[ $status = 200 ]]; then | ||
successOrExit curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD -o ./$fname $url | ||
|
||
fname=$(pwd)/$fname | ||
|
||
yum -y install $fname 2>&1 > /dev/null | ||
|
||
echo "********* MarkLogic nightly $ver installed" | ||
else | ||
echo "CANNOT DOWNLOAD: status = $status for date $day (URL=\"$url\")" | ||
exit 1 | ||
fi | ||
else | ||
echo "There is no ML 10, silly!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
#!/bin/bash | ||
|
||
# runs command from parameters and exits with the eoror code of the command | ||
# if it fails | ||
function successOrExit { | ||
"$@" | ||
local status=$? | ||
if [ $status -ne 0 ]; then | ||
echo "$1 exited with error: $status" | ||
exit $status | ||
fi | ||
} | ||
|
||
test $1 && MLBUILD_USER=$1 | ||
test $2 && MLBUILD_PASSWORD=$2 | ||
test $3 && ML_VERSION=$3 | ||
|
||
suffix=$(sed -e 's#.*\.\(\)#\1#' <<< $ML_VERSION) | ||
if [[ $suffix = 'nightly' ]]; then | ||
# find today | ||
day=$(date +"%Y%m%d") | ||
|
||
# if the user passed a day string as a param then use it instead | ||
test $4 && day=$4 | ||
# make a version number out of the date | ||
ver="8.0-$day" | ||
|
||
echo "********* Downloading MarkLogic nightly $ver" | ||
|
||
# fetch/install ML nightly | ||
fname="MarkLogic-RHEL7-$ver.x86_64.rpm" | ||
|
||
url="https://root.marklogic.com/nightly/builds/linux64-rh7/rh7-intel64-80-test-1.marklogic.com/b8_0/pkgs.$day/$fname" | ||
|
||
status=$(curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD --head --write-out %{http_code} --silent --output /dev/null $url) | ||
if [[ $status = 200 ]]; then | ||
successOrExit curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD -o ./$fname $url | ||
|
||
fname=$(pwd)/$fname | ||
|
||
yum -y install $fname --skip-broken | ||
|
||
echo "********* MarkLogic nightly $ver installed" | ||
else | ||
echo "CANNOT DOWNLOAD: status = $status for date $day (URL=\"$url\")" | ||
exit 1 | ||
fi | ||
else | ||
ver=${ML_VERSION} | ||
fname=MarkLogic-RHEL7-${ver}.x86_64.rpm | ||
|
||
curl -c cookies.txt --data "email=${MLBUILD_USER}&password=${MLBUILD_PASSWORD}" https://developer.marklogic.com/login | ||
dl_link=$(curl -b cookies.txt --data "download=/download/binaries/8.0/${fname}" https://developer.marklogic.com/get-download-url | perl -pe 's/.*"path":"([^"]+).*/\1/') | ||
url="https://developer.marklogic.com${dl_link}" | ||
|
||
echo "********* Downloading MarkLogic $ver" | ||
echo "Download URL: $url" | ||
|
||
successOrExit curl -k -o ./$fname $url | ||
|
||
fname=$(pwd)/$fname | ||
|
||
yum -y install $fname --skip-broken | ||
|
||
echo "********* MarkLogic $ver installed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#!/bin/bash | ||
|
||
# runs command from parameters and exits with the eoror code of the command | ||
# if it fails | ||
function successOrExit { | ||
"$@" | ||
local status=$? | ||
if [ $status -ne 0 ]; then | ||
echo "$1 exited with error: $status" | ||
exit $status | ||
fi | ||
} | ||
|
||
test $1 && MLBUILD_USER=$1 | ||
test $2 && MLBUILD_PASSWORD=$2 | ||
test $3 && ML_VERSION=$3 | ||
|
||
suffix=$(sed -e 's#.*\.\(\)#\1#' <<< $ML_VERSION) | ||
if [[ $suffix = 'nightly' ]]; then | ||
# find today | ||
day=$(date +"%Y%m%d") | ||
|
||
# if the user passed a day string as a param then use it instead | ||
test $4 && day=$4 | ||
# make a version number out of the date | ||
ver="9.0-$day" | ||
|
||
echo "********* Downloading MarkLogic nightly $ver" | ||
|
||
# fetch/install ML nightly | ||
fname="MarkLogic-$ver.x86_64.rpm" | ||
|
||
url="https://root.marklogic.com/nightly/builds/linux64-rh7/rh7v-intel64-90-test-build.marklogic.com/b9_0/pkgs.$day/$fname" | ||
|
||
status=$(curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD --head --write-out %{http_code} --silent --output /dev/null $url) | ||
if [[ $status = 200 ]]; then | ||
successOrExit curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD -o ./$fname $url | ||
|
||
fname=$(pwd)/$fname | ||
|
||
yum -y install $fname 2>&1 > /dev/null | ||
|
||
echo "********* MarkLogic nightly $ver installed" | ||
else | ||
echo "CANNOT DOWNLOAD: status = $status for date $day (URL=\"$url\")" | ||
exit 1 | ||
fi | ||
else | ||
ver=${ML_VERSION} | ||
fname=MarkLogic-${ver}.x86_64.rpm | ||
|
||
curl -c cookies.txt --data "email=${MLBUILD_USER}&password=${MLBUILD_PASSWORD}" https://developer.marklogic.com/login | ||
dl_link=$(curl -b cookies.txt --data "download=/download/binaries/9.0/${fname}" https://developer.marklogic.com/get-download-url | perl -pe 's/.*"path":"([^"]+).*/\1/') | ||
url="https://developer.marklogic.com${dl_link}" | ||
|
||
echo "********* Downloading MarkLogic $ver" | ||
|
||
successOrExit curl -k -o ./$fname $url | ||
|
||
fname=$(pwd)/$fname | ||
|
||
yum -y install $fname 2>&1 > /dev/null | ||
|
||
echo "********* MarkLogic $ver installed" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
test $1 && MLBUILD_USER=$1 | ||
test $2 && MLBUILD_PASSWORD=$2 | ||
test $3 && ML_VERSION=$3 | ||
echo "ML_VERSION = ${ML_VERSION}" | ||
MAJOR_VER=$(sed -e 's#\([^.]*\)\..*#\1#' <<< $ML_VERSION) | ||
echo "major version = ${MAJOR_VER}" | ||
if [ "${MAJOR_VER}" = "8" ]; then | ||
echo "/tmp/install-ml-8.sh" | ||
chmod 755 /tmp/install-ml-8.sh | ||
/tmp/install-ml-8.sh ${MLBUILD_USER} ${MLBUILD_PASSWORD} ${ML_VERSION} | ||
elif [ "${MAJOR_VER}" = "9" ]; then | ||
echo "/tmp/install-ml-9.sh" | ||
chmod 755 /tmp/install-ml-9.sh | ||
/tmp/install-ml-9.sh ${MLBUILD_USER} ${MLBUILD_PASSWORD} ${ML_VERSION} | ||
elif [ "${MAJOR_VER}" = "10" ]; then | ||
echo "/tmp/install-ml-10.sh" | ||
chmod 755 /tmp/install-ml-10.sh | ||
/tmp/install-ml-10.sh ${MLBUILD_USER} ${MLBUILD_PASSWORD} ${ML_VERSION} | ||
else | ||
echo "NOTHING TO INSTALL!" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/sh | ||
|
||
# This script is used to build the docker images | ||
# used to test the DHF in Travis | ||
|
||
# build release images | ||
read -p "DMC User: " myuser | ||
read -s -p "DMC Password: " mypass | ||
|
||
test $myuser && export MLBUILD_USER=$myuser | ||
test $mypass && export MLBUILD_PASSWORD=$mypass | ||
echo | ||
|
||
for ver in 8.0-7 9.0-1.1 9.0-2 9.0-3 | ||
do | ||
export ML_VERSION=$ver | ||
docker-compose build | ||
done | ||
|
||
# build nightly images | ||
read -p "Nightly User: " myuser | ||
read -s -p "Nightly Password: " mypass | ||
|
||
test $myuser && export MLBUILD_USER=$myuser | ||
test $mypass && export MLBUILD_PASSWORD=$mypass | ||
echo | ||
|
||
for ver in 8.nightly 9.nightly 10.nightly | ||
do | ||
export ML_VERSION=$ver | ||
docker-compose build | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters