Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
sudo: required
language: java

jdk:
- oraclejdk8

env:
global:
- MAVEN_HOME=/usr/local/maven
- MAVEN_CFG=$HOME/.m2

cache:
directories:
- $MAVEN_CFG
- $MAVEN_HOME/lib/ext # Used to cache wagon-http lib.

install:
- bash .travis/maven_cfg.sh

script:
- mvn package -DskipTests
- mvn package appassembler:assemble

before_deploy:
- bash .travis/create_release.sh

deploy:
provider: bintray
file: bintray.json
user: $BINTRAY_USER
key: $BINTRAY_API_KEY
dry-run: false
on: develop
24 changes: 24 additions & 0 deletions .travis/create_release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash
set -ev

VERSION=`date +%Y%m%d%H%M`

mkdir dist
mv target/appassembler utPLSQL-cli
zip -r -q dist/utPLSQL-cli-${TRAVIS_BRANCH}-${VERSION}.zip utPLSQL-cli

cat > bintray.json <<EOF
{
"package": {
"name": "utPLSQL-cli-${TRAVIS_BRANCH}",
"repo": "utPLSQL-cli",
"subject": "${BINTRAY_USER}",
"website_url": "https://github.com/utPLSQL/utPLSQL-cli",
"vcs_url": "https://github.com/utPLSQL/utPLSQL-cli.git",
"licenses": [ "MIT" ]
},
"version": { "name": "${TRAVIS_BRANCH}" },
"files": [ { "includePattern": "dist/(.*)", "uploadPattern": "\$1" } ],
"publish": true
}
EOF
26 changes: 26 additions & 0 deletions .travis/maven_cfg.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash
set -ev
cd $(dirname $(readlink -f $0))

if [ -f $MAVEN_CFG/repository ]; then
echo "Using cached maven dependencies..."
exit 0
fi

if [ "$ORACLE_OTN_USER" == "" ] || [ "$ORACLE_OTN_PASSWORD" == "" ]; then
echo "Oracle OTN username/password not specified."
exit 1
fi

# Download wagon-http recommended by Oracle.
# On maven latest version this is not needed, but travis doesn't have it.
curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.8/wagon-http-2.8-shaded.jar"
sudo mv wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/

# Create the settings file with oracle server config.
cp settings.xml $MAVEN_CFG/settings.xml

# The Java API is not available on a public repository yet, we need to download and install it locally.
git clone https://github.com/utPLSQL/utPLSQL-java-api.git
cd utPLSQL-java-api
mvn package install -DskipTests
51 changes: 51 additions & 0 deletions .travis/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

<servers>
<server>
<id>maven.oracle.com</id>
<username>${env.ORACLE_OTN_USER}</username>
<password>${env.ORACLE_OTN_PASSWORD}</password>
<configuration>
<basicAuthScope>
<host>ANY</host>
<port>ANY</port>
<realm>OAM 11g</realm>
</basicAuthScope>
<httpConfiguration>
<all>
<params>
<property>
<name>http.protocol.allow-circular-redirects</name>
<value>%b,true</value>
</property>
</params>
</all>
</httpConfiguration>
</configuration>
</server>
</servers>

</settings>