-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
95 additions
and
149 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,39 @@ | ||
# Base build parameters | ||
base_build: &base_build | ||
working_directory: ~/repo | ||
docker: | ||
- image: circleci/openjdk:8-jdk | ||
environment: | ||
MAVEN_OPTS: -Xmx3200m | ||
version: 2.1 | ||
|
||
# Base steps for maven project | ||
base_restore_cache: &base_restore_cache | ||
restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "pom.xml" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
orbs: | ||
maven: circleci/[email protected] | ||
|
||
base_save_cache: &base_save_cache | ||
save_cache: | ||
paths: | ||
- ~/.m2 | ||
key: v1-dependencies-{{ checksum "pom.xml" }} | ||
executors: | ||
openjdk8: | ||
docker: | ||
- image: cimg/openjdk:8.0 | ||
|
||
# Jobs definitions | ||
version: 2 | ||
jobs: | ||
build: | ||
<<: *base_build | ||
|
||
steps: | ||
- checkout | ||
- *base_restore_cache | ||
- run: mvn dependency:go-offline | ||
- *base_save_cache | ||
# run tests! | ||
- run: mvn clean install | ||
|
||
deploy: | ||
<<: *base_build | ||
|
||
steps: | ||
- checkout | ||
- *base_restore_cache | ||
- run: mvn dependency:go-offline | ||
- *base_save_cache | ||
# Import key in GPG | ||
- run: echo $GPG_SECRET_KEY | base64 --decode | $GPG_EXECUTABLE --batch --import | ||
# Deploy to sonatype | ||
- run: mvn clean deploy -DskipTests -DdeployTo=sonatype --settings .circleci/settings.xml | ||
|
||
# Workflow definitions | ||
workflows: | ||
version: 2 | ||
deploy_sonatype: | ||
build-and-deploy: | ||
jobs: | ||
- build | ||
# If we are on master or a release branch, we deploy directly to sonatype. Release version will still need manual | ||
# approval via sonatype UI: https://oss.sonatype.org/#stagingRepositories | ||
- deploy: | ||
context: org-global | ||
- maven/test: | ||
name: build | ||
executor: openjdk8 | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- /release\/.*/ | ||
settings_file: .circleci/m2-settings.xml | ||
verify_dependencies: false | ||
- maven/test: | ||
name: deploy | ||
executor: openjdk8 | ||
requires: | ||
- build | ||
context: | ||
- org-global | ||
- cloudsoft-artifactory | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- /^release\/.*$/ | ||
- /release\/.*/ | ||
settings_file: .circleci/m2-settings.xml | ||
command: deploy -DskipTests -P cloudsoft-release | ||
verify_dependencies: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<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>cloudsoft-deploy-artifactory-snapshot</id> | ||
<username>${env.ARTIFACTORY_USERNAME}</username> | ||
<password>${env.ARTIFACTORY_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>cloudsoft-deploy-artifactory-release</id> | ||
<username>${env.ARTIFACTORY_USERNAME}</username> | ||
<password>${env.ARTIFACTORY_PASSWORD}</password> | ||
</server> | ||
|
||
<server> | ||
<id>cloudsoft-snapshots</id> | ||
<username>${env.ARTIFACTORY_USERNAME}</username> | ||
<password>${env.ARTIFACTORY_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>cloudsoft-releases</id> | ||
<username>${env.ARTIFACTORY_USERNAME}</username> | ||
<password>${env.ARTIFACTORY_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>cloudsoft-artifactory-repo</id> | ||
<username>${env.ARTIFACTORY_USERNAME}</username> | ||
<password>${env.ARTIFACTORY_PASSWORD}</password> | ||
</server> | ||
|
||
<server> | ||
<id>sonatype-nexus-staging</id> | ||
<username>${env.SONATYPE_USER}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
<server> | ||
<id>sonatype-nexus-snapshots</id> | ||
<username>${env.SONATYPE_USER}</username> | ||
<password>${env.SONATYPE_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
</settings> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters