Skip to content

Commit

Permalink
19: Add deploy step to CI flow
Browse files Browse the repository at this point in the history
  • Loading branch information
keilw committed Jan 3, 2018
1 parent e0284e4 commit c2b4a7b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 39 deletions.
40 changes: 1 addition & 39 deletions .circleci/config.yml
Expand Up @@ -76,49 +76,11 @@ jobs:
- run: mvn test

- run: bash <(curl -s https://codecov.io/bash)
deploy:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk

# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/postgres:9.4

working_directory: ~/repo

environment:
# Customize the JVM maximum heap limit
MAVEN_OPTS: -Xmx3200m

steps:
- checkout

# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-

- run: mvn dependency:go-offline

- save_cache:
paths:
- ~/.m2
key: v1-dependencies-{{ checksum "pom.xml" }}

# run deployment!
- run: - mvn deploy -Dmaven.test.skip -s settings.xml
workflows:
version: 2
clean_build_deploy:
jobs:
- clean
- build:
requires:
- clean
- deploy:
requires:
- build
- clean
14 changes: 14 additions & 0 deletions settings.xml
@@ -0,0 +1,14 @@
<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>bintray-snapshot</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
<server>
<id>bintray-release</id>
<username>${env.CI_DEPLOY_USERNAME}</username>
<password>${env.CI_DEPLOY_PASSWORD}</password>
</server>
</servers>
</settings>

0 comments on commit c2b4a7b

Please sign in to comment.