Skip to content

Adding upload of release artifact to packagecloud.io #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 20, 2017
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
28 changes: 28 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,33 @@ install:
- bash .travis/install_utplsql.sh
- bash .travis/install_demo_project.sh

before_script:
- cp .travis/settings.xml $MAVEN_CFG/settings.xml

script:
- mvn test -B

before_deploy:
- if [ ! -z "$TRAVIS_TAG" ]; then mvn org.codehaus.mojo:versions-maven-plugin:2.1:set -DnewVersion=${TRAVIS_TAG}; fi

deploy:
- provider: script
script: mvn clean deploy -DskipTests=true -B -U
skip_cleanup: true
on:
repository: utPLSQL/utPLSQL-java-api
tags: true
# Use only first job "#xxx.1" to publish artifacts
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"

- provider: script
script: mvn clean deploy -DskipTests=true -B -U
skip_cleanup: true
on:
repository: utPLSQL/utPLSQL-java-api
branch: develop
# Use only first job "#xxx.1" to publish artifacts
condition: "${TRAVIS_JOB_NUMBER} =~ \\.1$"

notifications:
slack: $SLACK_API_TOKEN
9 changes: 0 additions & 9 deletions .travis/maven_cfg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,3 @@ else
echo "Using cached wagon-http..."
sudo cp $CACHE_DIR/wagon-http-2.8-shaded.jar $MAVEN_HOME/lib/ext/
fi

# Create the settings file with oracle server config.
# If file already exists, Oracle dependencies were cached on previous build.
if [ ! -f $MAVEN_CFG/.cached ]; then
cp settings.xml $MAVEN_CFG/settings.xml
touch $MAVEN_CFG/.cached
else
echo "Using cached maven settings..."
fi
4 changes: 4 additions & 0 deletions .travis/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ under the License.
</httpConfiguration>
</configuration>
</server>
<server>
<id>packagecloud-utPLSQL</id>
<password>${env.PACKAGECLOUD_TOKEN}</password>
</server>
</servers>

</settings>
27 changes: 25 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,36 @@ This is a collection of classes, that makes easy to access the [utPLSQL v3](http
* Can gather results asynchronously from multiple reporters.

## Downloading
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).
This is a Maven Library project, you can add on your Java project as a dependency.

The library is hosted on ![[packagecloud](https://packagecloud.io/utPLSQL/utPLSQL-java-api)](https://packagecloud.io/images/packagecloud-badge.png)


You install this Maven repository by adding it to the <repositories> section of your pom.xml. No special plugins or extensions are required.

```xml
<repositories>
<repository>
<id>utplsql-java-api</id>
<url>
https://packagecloud.io/utplsql/utplsql-java-api/maven2
</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
```

To use the java-api library, add this to the `<dependencies>` section of your `pom.xml`.
```xml
<dependency>
<groupId>org.utplsql</groupId>
<artifactId>java-api</artifactId>
<version>3.0.4-SNAPSHOT</version>
<version>3.0.4</version>
<scope>compile</scope>
</dependency>
```
Expand Down
21 changes: 21 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,25 @@
</pluginRepository>
</pluginRepositories>

<build>
<extensions>
<extension>
<groupId>io.packagecloud.maven.wagon</groupId>
<artifactId>maven-packagecloud-wagon</artifactId>
<version>0.0.6</version>
</extension>
</extensions>
</build>

<distributionManagement>
<repository>
<id>packagecloud-utPLSQL</id>
<url>packagecloud+https://packagecloud.io/utPLSQL/utPLSQL-java-api</url>
</repository>
<snapshotRepository>
<id>packagecloud-utPLSQL</id>
<url>packagecloud+https://packagecloud.io/utPLSQL/utPLSQL-java-api</url>
</snapshotRepository>
</distributionManagement>

</project>