Skip to content

Commit fb14348

Browse files
authored
Merge pull request #34 from utPLSQL/feature/upload_releases_to_packagecloud
Adding upload of release artifact to packagecloud.io
2 parents 8add8b1 + 9976d3b commit fb14348

File tree

5 files changed

+78
-11
lines changed

5 files changed

+78
-11
lines changed

.travis.yml

+28
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,33 @@ install:
4040
- bash .travis/install_utplsql.sh
4141
- bash .travis/install_demo_project.sh
4242

43+
before_script:
44+
- cp .travis/settings.xml $MAVEN_CFG/settings.xml
45+
4346
script:
4447
- mvn test -B
48+
49+
before_deploy:
50+
- if [ ! -z "$TRAVIS_TAG" ]; then mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=${TRAVIS_TAG}; fi
51+
52+
deploy:
53+
- provider: script
54+
script: mvn clean deploy -DskipTests=true -B -U
55+
skip_cleanup: true
56+
on:
57+
repository: utPLSQL/utPLSQL-java-api
58+
tags: true
59+
# Use only first job "#xxx.1" to publish artifacts
60+
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"
61+
62+
- provider: script
63+
script: mvn clean deploy -DskipTests=true -B -U
64+
skip_cleanup: true
65+
on:
66+
repository: utPLSQL/utPLSQL-java-api
67+
branch: develop
68+
# Use only first job "#xxx.1" to publish artifacts
69+
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"
70+
71+
notifications:
72+
slack: $SLACK_API_TOKEN

.travis/maven_cfg.sh

-9
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,3 @@ else
1212
echo "Using cached wagon-http..."
1313
sudo cp $CACHE_DIR/wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/
1414
fi
15-
16-
# Create the settings file with oracle server config.
17-
# If file already exists, Oracle dependencies were cached on previous build.
18-
if [ ! -f $MAVEN_CFG/.cached ]; then
19-
cp settings.xml $MAVEN_CFG/settings.xml
20-
touch $MAVEN_CFG/.cached
21-
else
22-
echo "Using cached maven settings..."
23-
fi

.travis/settings.xml

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ under the License.
4646
</httpConfiguration>
4747
</configuration>
4848
</server>
49+
<server>
50+
<id>packagecloud-utPLSQL</id>
51+
<password>${env.PACKAGECLOUD_TOKEN}</password>
52+
</server>
4953
</servers>
5054

5155
</settings>

README.md

+25-2
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,36 @@ This is a collection of classes, that makes easy to access the [utPLSQL v3](http
88
* Can gather results asynchronously from multiple reporters.
99

1010
## Downloading
11-
This is a Maven Library project, you can add on your Java project as a dependency. At the moment, it's not available in any public Maven repository, but you can clone it and install as a local dependency (follow the Contributing session).
11+
This is a Maven Library project, you can add on your Java project as a dependency.
1212

13+
The library is hosted on ![[packagecloud](https://packagecloud.io/utPLSQL/utPLSQL-java-api)](https://packagecloud.io/images/packagecloud-badge.png)
14+
15+
16+
You install this Maven repository by adding it to the <repositories> section of your pom.xml. No special plugins or extensions are required.
17+
18+
```xml
19+
<repositories>
20+
<repository>
21+
<id>utplsql-java-api</id>
22+
<url>
23+
https://packagecloud.io/utplsql/utplsql-java-api/maven2
24+
</url>
25+
<releases>
26+
<enabled>true</enabled>
27+
</releases>
28+
<snapshots>
29+
<enabled>true</enabled>
30+
</snapshots>
31+
</repository>
32+
</repositories>
33+
```
34+
35+
To use the java-api library, add this to the `<dependencies>` section of your `pom.xml`.
1336
```xml
1437
<dependency>
1538
<groupId>org.utplsql</groupId>
1639
<artifactId>java-api</artifactId>
17-
<version>3.0.4-SNAPSHOT</version>
40+
<version>3.0.4</version>
1841
<scope>compile</scope>
1942
</dependency>
2043
```

pom.xml

+21
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,25 @@
5858
</pluginRepository>
5959
</pluginRepositories>
6060

61+
<build>
62+
<extensions>
63+
<extension>
64+
<groupId>io.packagecloud.maven.wagon</groupId>
65+
<artifactId>maven-packagecloud-wagon</artifactId>
66+
<version>0.0.6</version>
67+
</extension>
68+
</extensions>
69+
</build>
70+
71+
<distributionManagement>
72+
<repository>
73+
<id>packagecloud-utPLSQL</id>
74+
<url>packagecloud+https://packagecloud.io/utPLSQL/utPLSQL-java-api</url>
75+
</repository>
76+
<snapshotRepository>
77+
<id>packagecloud-utPLSQL</id>
78+
<url>packagecloud+https://packagecloud.io/utPLSQL/utPLSQL-java-api</url>
79+
</snapshotRepository>
80+
</distributionManagement>
81+
6182
</project>

0 commit comments

Comments
 (0)