Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit cb58ba4

Browse files
committed
Merging in 2.2.0 work from dev
1 parent 01499fa commit cb58ba4

File tree

56 files changed

+989
-631
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+989
-631
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
src/test/resources/user.properties
99
setenv.bat
1010
src/test/resources/scaffold-test/
11+
.DS_Store

.travis.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
language: java
2+
jdk:
3+
- oraclejdk7
4+
sudo: true
5+
before_install:
6+
- echo 'America/Los_Angeles' | sudo tee /etc/timezone
7+
- sudo dpkg-reconfigure --frontend noninteractive tzdata
8+
install:
9+
- ./shared/dev-tasks/install-dependencies.sh
10+
script:
11+
- ./shared/dev-tasks/run-tests.sh
12+
13+
#whitelist
14+
branches:
15+
only:
16+
- dev

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
[![Build Status](https://travis-ci.org/rjrudin/ml-app-deployer.svg?branch=dev)](https://travis-ci.org/rjrudin/ml-app-deployer)
2+
13
## What is ml-app-deployer?
24

35
ml-app-deployer is a Java library that provides two capabilities:

build.gradle

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@ repositories {
1515
}
1616

1717
dependencies {
18-
compile 'com.marklogic:ml-javaclient-util:2.8.0'
18+
compile 'com.marklogic:ml-javaclient-util:2.9.0-RC1'
1919
compile 'jaxen:jaxen:1.1.6'
2020
compile 'org.apache.httpcomponents:httpclient:4.3.5'
2121
compile 'org.springframework:spring-web:4.1.5.RELEASE'
22-
testCompile 'com.marklogic:ml-junit:2.6.0'
22+
testCompile ('com.marklogic:ml-junit:2.6.0') {
23+
exclude module: "ml-javaclient-util"
24+
}
2325
}
2426

2527
// This ensures that Gradle includes in the published jar any non-java files under src/main/java
@@ -42,11 +44,6 @@ publishing {
4244
artifact sourcesJar
4345
}
4446
}
45-
repositories {
46-
maven {
47-
url publishUrl
48-
}
49-
}
5047
}
5148

5249
if (project.hasProperty("myBintrayUser")) {
@@ -60,7 +57,7 @@ if (project.hasProperty("myBintrayUser")) {
6057
licenses = ['Apache-2.0']
6158
vcsUrl = 'https://github.com/rjrudin/' + project.name + '.git'
6259
version {
63-
name = "2.1.0"
60+
name = "2.2.0-RC1"
6461
released = new Date()
6562
}
6663
}

gradle.properties

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
group=com.marklogic
2-
publishUrl=file:../gh-pages-marklogic-java/releases
32
javadocsDir=../gh-pages-marklogic-java/javadocs
4-
version=2.1.0
3+
version=2.2.0-RC1
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
if [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] ; then
4+
./shared/dev-tasks/travis-install-ml.sh release
5+
./shared/dev-tasks/setup-marklogic.sh
6+
fi

shared/dev-tasks/run-tests.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
if [ "${TRAVIS_SECURE_ENV_VARS}" = "true" ] ; then
4+
cd ${TRAVIS_BUILD_DIR}
5+
./gradlew test -i
6+
fi

shared/dev-tasks/setup-marklogic.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
3+
sudo /etc/init.d/MarkLogic start
4+
sleep 10
5+
curl -X POST -d "" http://localhost:8001/admin/v1/init
6+
sleep 10
7+
curl -X POST -H "Content-type: application/x-www-form-urlencoded" \
8+
--data "admin-username=admin" \
9+
--data "admin-password=admin" \
10+
--data "realm=public" \
11+
"http://localhost:8001/admin/v1/instance-admin"
12+
sleep 10

shared/dev-tasks/travis-install-ml.sh

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
#!/bin/bash
2+
3+
# runs command from parameters and exits with the eoror code of the command
4+
# if it fails
5+
function successOrExit {
6+
"$@"
7+
local status=$?
8+
if [ $status -ne 0 ]; then
9+
echo "$1 exited with error: $status"
10+
exit $status
11+
fi
12+
}
13+
14+
set | grep TRAVIS
15+
16+
test $1 && arg1=$1
17+
if [[ $arg1 = 'release' ]]; then
18+
ver=${ML_VERSION}
19+
fname=MarkLogic-RHEL6-${ver}.x86_64.rpm
20+
fnamedeb="marklogic_"
21+
fnamedeb=$fnamedeb$ver
22+
suff="_amd64.deb"
23+
fnamedeb=$fnamedeb$suff
24+
25+
curl -c cookies.txt --data "email=${MLBUILD_USER}&password=${MLBUILD_PASSWORD}" https://developer.marklogic.com/login
26+
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/')
27+
url="https://developer.marklogic.com${dl_link}"
28+
29+
echo "********* Downloading MarkLogic $ver"
30+
31+
successOrExit curl -k -o ./$fname $url
32+
33+
fname=$(pwd)/$fname
34+
35+
sudo apt-get update
36+
sudo apt-get install wajig alien rpm lsb-base dpkg-dev debhelper build-essential
37+
(cd /etc && sudo ln -s default sysconfig)
38+
sudo wajig rpminstall $fname
39+
40+
echo "********* MarkLogic $ver installed"
41+
else
42+
# find today
43+
day=$(date +"%Y%m%d")
44+
45+
# if the user passed a day string as a param then use it instead
46+
test $1 && day=$1
47+
# make a version number out of the date
48+
ver="8.0-$day"
49+
50+
echo "********* Downloading MarkLogic nightly $ver"
51+
52+
# fetch/install ML nightly
53+
fname="MarkLogic-$ver.x86_64.rpm"
54+
fnamedeb="marklogic_"
55+
fnamedeb=$fnamedeb$ver
56+
suff="_amd64.deb"
57+
fnamedeb=$fnamedeb$suff
58+
59+
url="https://root.marklogic.com/nightly/builds/linux64/rh6-intel64-80-test-1.marklogic.com/b8_0/pkgs.$day/$fname"
60+
61+
status=$(curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD --head --write-out %{http_code} --silent --output /dev/null $url)
62+
if [[ $status = 200 ]]; then
63+
successOrExit curl -k --anyauth -u $MLBUILD_USER:$MLBUILD_PASSWORD -o ./$fname $url
64+
65+
fname=$(pwd)/$fname
66+
67+
sudo apt-get update
68+
sudo apt-get install alien dpkg-dev debhelper build-essential
69+
sudo alien -d -k $fname
70+
sudo dpkg -i $fnamedeb
71+
72+
echo "********* MarkLogic nightly $ver installed"
73+
else
74+
echo "CANNOT DOWNLOAD: status = $status for date $day (URL=\"$url\")"
75+
exit 1
76+
fi
77+
fi

0 commit comments

Comments
 (0)