Skip to content

Commit

Permalink
Update CircleCI configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tbouron committed Mar 14, 2024
1 parent 80bccdc commit 07232bf
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 20 deletions.
42 changes: 42 additions & 0 deletions .circleci/circleci-m2-settings.xml
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>
63 changes: 43 additions & 20 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,59 @@
# Java Maven CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-java/ for more details
#
version: 2
version: 2.1

executors:
openjdk8:
docker:
- image: cimg/openjdk:8.0

jobs:
build:
docker:
# specify the version you desire here
- image: circleci/openjdk:8-jdk
working_directory: ~/repo

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

executor: openjdk8

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
- run:
name: Build
command: mvn -s .circleci/circleci-m2-settings.xml clean install

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

# run tests!
- run: mvn integration-test
deploy:
executor: openjdk8

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "pom.xml" }}
- v1-dependencies-

- run:
name: Deploy
command: mvn -s .circleci/circleci-m2-settings.xml clean deploy -P cloudsoft-release -P sonatype-release

workflows:
build-and-deploy:
jobs:
- build:
filters:
branches:
only: master
- deploy:
requires:
- build
context:
- org-global
- cloudsoft-artifactory
filters:
branches:
only: master

0 comments on commit 07232bf

Please sign in to comment.