-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
48 lines (34 loc) · 1.22 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
orbs:
nexus-orb: sonatype/[email protected]
version: 2.1 # use CircleCI 2.1
jobs:
build:
working_directory: ~/circleci-demo-java-spring
docker:
- image: circleci/openjdk:8-jdk-browsers
- image: circleci/postgres:9.6.3-alpine
environment:
POSTGRES_USER: root
POSTGRES_DB: circle_test
steps:
- checkout
- restore_cache:
key: circleci-demo-java-spring-{{ checksum "pom.xml" }}
- run: mvn dependency:go-offline
- save_cache:
paths:
- ~/.m2
key: circleci-demo-java-spring-{{ checksum "pom.xml" }}
- run: mvn package -DskipTests -DskipITs
- store_test_results:
path: target/surefire-reports
- store_artifacts:
path: target/demo-java-spring-0.0.1-SNAPSHOT.jar
- nexus-orb/install
- run: echo 54.73.4.196 nexus.extenda.io | sudo tee -a /etc/hosts
- nexus-orb/publish:
filename: "target/demo-java-spring-0.0.1-SNAPSHOT.jar"
attributes: "-CgroupId=com.example -CartifactId=myapp -Cversion=1.3 -Aextension=jar"
username: "${NEXUS_RM_USERNAME}"
password: "${NEXUS_RM_PASSWORD}"
serverurl: "${NEXUS_RM_SERVERURL}"