File tree 4 files changed +45
-39
lines changed
4 files changed +45
-39
lines changed Original file line number Diff line number Diff line change 1
1
version : 2.1
2
2
3
3
jobs :
4
- build :
5
- docker :
6
- - image : ' cimg/openjdk:8.0'
4
+ analyze :
5
+ executor :
6
+ name : docker/machine
7
+ image : ubuntu-2204:2022.04.2
7
8
steps :
8
- - setup_remote_docker :
9
- version : 20.10.14
10
9
- checkout
11
- - run :
12
- name : Copy source
13
- command : docker cp . /home/circleci/project
10
+ - docker/install-docker-compose
14
11
- run :
15
12
name : Run Pact Broker
16
13
command : docker-compose up -d
17
- - run :
18
- name : Analyze on SonarCloud
19
- command : ssh remote-docker \ cd /home/circleci/project && mvn verify sonar:sonar
20
- - run :
21
- name : Run Pact Broker
22
- command : docker-compose down -d
14
+ - maven/with_cache :
15
+ steps :
16
+ - run :
17
+ name : Run Tests
18
+ command : mvn package pact:publish
19
+ - maven/with_cache :
20
+ steps :
21
+ - run :
22
+ name : Sonar Analysis
23
+ command : mvn package sonar:sonar -DskipTests -Dquarkus.container-image.build=false
23
24
24
25
executors :
25
- j8 :
26
- docker :
27
- - image : ' cimg/openjdk:8.0'
26
+ machine :
27
+ machine :
28
+ image : ubuntu-2204:2022.04.2
29
+ environment :
30
+ architecture : " amd64"
31
+ platform : " linux/amd64"
28
32
29
33
orbs :
30
- maven :
circleci/[email protected] .0
34
+ maven :
circleci/[email protected] .1
31
35
docker :
circleci/[email protected]
32
36
33
37
workflows :
34
38
maven_test :
35
39
jobs :
36
- - maven/test :
37
- executor : j8
38
- - build :
40
+ - analyze :
39
41
context : SonarCloud
Original file line number Diff line number Diff line change @@ -5,26 +5,26 @@ services:
5
5
image : postgres
6
6
healthcheck :
7
7
test : psql postgres --command "select 1" -U postgres
8
- volumes :
9
- - postgres-volume:/var/lib/postgresql/data
10
8
environment :
11
9
POSTGRES_USER : postgres
12
10
POSTGRES_PASSWORD : password
13
11
POSTGRES_DB : postgres
12
+ ports :
13
+ - " 5432:5432"
14
14
15
15
pact-broker :
16
16
image : pactfoundation/pact-broker:2.105.0.1
17
17
ports :
18
18
- " 9292:9292"
19
19
depends_on :
20
20
- postgres
21
+ links :
22
+ - postgres
21
23
environment :
22
- PACT_BROKER_PORT : ' 9292'
23
- PACT_BROKER_DATABASE_URL : " postgres://postgres:password@postgres/postgres"
24
+ PACT_BROKER_DATABASE_USERNAME : postgres
25
+ PACT_BROKER_DATABASE_PASSWORD : password
26
+ PACT_BROKER_DATABASE_HOST : postgres
27
+ PACT_BROKER_DATABASE_NAME : postgres
24
28
PACT_BROKER_LOG_LEVEL : INFO
25
29
PACT_BROKER_SQL_LOG_LEVEL : DEBUG
26
- PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES : " 5"
27
- PACT_BROKER_BASE_URL : ' https://localhost http://localhost http://localhost:9292 http://pact-broker:9292 https://host.docker.internal http://host.docker.internal http://host.docker.internal:9292'
28
-
29
- volumes :
30
- postgres-volume:
30
+ PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES : " 5"
Original file line number Diff line number Diff line change 17
17
<module >performance-tests</module >
18
18
</modules >
19
19
20
+ <build >
21
+ <plugins >
22
+ <plugin >
23
+ <groupId >au.com.dius</groupId >
24
+ <artifactId >pact-jvm-provider-maven_2.12</artifactId >
25
+ <version >3.5.21</version >
26
+ <configuration >
27
+ <pactBrokerUrl >http://localhost:9292</pactBrokerUrl >
28
+ </configuration >
29
+ </plugin >
30
+ </plugins >
31
+ </build >
32
+
20
33
</project >
Original file line number Diff line number Diff line change 71
71
<version >3.5.21</version >
72
72
<configuration >
73
73
<pactBrokerUrl >http://localhost:9292</pactBrokerUrl >
74
- <!-- <serviceProviders>-->
75
- <!-- <serviceProvider>-->
76
- <!-- <name>passengerManagementProvider</name>-->
77
- <!-- <protocol>http</protocol>-->
78
- <!-- <host>localhost</host>-->
79
- <!-- <port>50925</port>-->
80
- <!-- <pactFileDirectory>target/pacts</pactFileDirectory>-->
81
- <!-- </serviceProvider>-->
82
- <!-- </serviceProviders>-->
83
74
</configuration >
84
75
</plugin >
85
76
<plugin >
You can’t perform that action at this time.
0 commit comments