Skip to content

Commit a26353b

Browse files
authored
Merge pull request #7 from viniciusam/build_config
Preview releases config
2 parents c2f6a32 + 76ab3af commit a26353b

File tree

4 files changed

+134
-0
lines changed

4 files changed

+134
-0
lines changed

.travis.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
sudo: required
2+
language: java
3+
4+
jdk:
5+
- oraclejdk8
6+
7+
env:
8+
global:
9+
- MAVEN_HOME=/usr/local/maven
10+
- MAVEN_CFG=$HOME/.m2
11+
12+
cache:
13+
directories:
14+
- $MAVEN_CFG
15+
- $MAVEN_HOME/lib/ext # Used to cache wagon-http lib.
16+
17+
install:
18+
- bash .travis/maven_cfg.sh
19+
20+
script:
21+
- mvn package -DskipTests
22+
- mvn package appassembler:assemble
23+
24+
before_deploy:
25+
- bash .travis/create_release.sh
26+
27+
deploy:
28+
provider: bintray
29+
file: bintray.json
30+
user: $BINTRAY_USER
31+
key: $BINTRAY_API_KEY
32+
dry-run: false
33+
on: develop

.travis/create_release.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
set -ev
3+
4+
VERSION=`date +%Y%m%d%H%M`
5+
6+
mkdir dist
7+
mv target/appassembler utPLSQL-cli
8+
zip -r -q dist/utPLSQL-cli-${TRAVIS_BRANCH}-${VERSION}.zip utPLSQL-cli
9+
10+
cat > bintray.json <<EOF
11+
{
12+
"package": {
13+
"name": "utPLSQL-cli-${TRAVIS_BRANCH}",
14+
"repo": "utPLSQL-cli",
15+
"subject": "${BINTRAY_USER}",
16+
"website_url": "https://github.com/utPLSQL/utPLSQL-cli",
17+
"vcs_url": "https://github.com/utPLSQL/utPLSQL-cli.git",
18+
"licenses": [ "MIT" ]
19+
},
20+
"version": { "name": "${TRAVIS_BRANCH}" },
21+
"files": [ { "includePattern": "dist/(.*)", "uploadPattern": "\$1" } ],
22+
"publish": true
23+
}
24+
EOF

.travis/maven_cfg.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
set -ev
3+
cd $(dirname $(readlink -f $0))
4+
5+
if [ -f $MAVEN_CFG/repository ]; then
6+
echo "Using cached maven dependencies..."
7+
exit 0
8+
fi
9+
10+
if [ "$ORACLE_OTN_USER" == "" ] || [ "$ORACLE_OTN_PASSWORD" == "" ]; then
11+
echo "Oracle OTN username/password not specified."
12+
exit 1
13+
fi
14+
15+
# Download wagon-http recommended by Oracle.
16+
# On maven latest version this is not needed, but travis doesn't have it.
17+
curl -L -O "http://central.maven.org/maven2/org/apache/maven/wagon/wagon-http/2.8/wagon-http-2.8-shaded.jar"
18+
sudo mv wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/
19+
20+
# Create the settings file with oracle server config.
21+
cp settings.xml $MAVEN_CFG/settings.xml
22+
23+
# The Java API is not available on a public repository yet, we need to download and install it locally.
24+
git clone https://github.com/utPLSQL/utPLSQL-java-api.git
25+
cd utPLSQL-java-api
26+
mvn package install -DskipTests

.travis/settings.xml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<!--
4+
Licensed to the Apache Software Foundation (ASF) under one
5+
or more contributor license agreements. See the NOTICE file
6+
distributed with this work for additional information
7+
regarding copyright ownership. The ASF licenses this file
8+
to you under the Apache License, Version 2.0 (the
9+
"License"); you may not use this file except in compliance
10+
with the License. You may obtain a copy of the License at
11+
12+
http://www.apache.org/licenses/LICENSE-2.0
13+
14+
Unless required by applicable law or agreed to in writing,
15+
software distributed under the License is distributed on an
16+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17+
KIND, either express or implied. See the License for the
18+
specific language governing permissions and limitations
19+
under the License.
20+
-->
21+
22+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
23+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
24+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
25+
26+
<servers>
27+
<server>
28+
<id>maven.oracle.com</id>
29+
<username>${env.ORACLE_OTN_USER}</username>
30+
<password>${env.ORACLE_OTN_PASSWORD}</password>
31+
<configuration>
32+
<basicAuthScope>
33+
<host>ANY</host>
34+
<port>ANY</port>
35+
<realm>OAM 11g</realm>
36+
</basicAuthScope>
37+
<httpConfiguration>
38+
<all>
39+
<params>
40+
<property>
41+
<name>http.protocol.allow-circular-redirects</name>
42+
<value>%b,true</value>
43+
</property>
44+
</params>
45+
</all>
46+
</httpConfiguration>
47+
</configuration>
48+
</server>
49+
</servers>
50+
51+
</settings>

0 commit comments

Comments
 (0)