Skip to content

Commit d24efd5

Browse files
committed
fix errors
1 parent 8fe385e commit d24efd5

File tree

4 files changed

+45
-39
lines changed

4 files changed

+45
-39
lines changed

.circleci/config.yml

+23-21
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
version: 2.1
22

33
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
78
steps:
8-
- setup_remote_docker:
9-
version: 20.10.14
109
- checkout
11-
- run:
12-
name: Copy source
13-
command: docker cp . /home/circleci/project
10+
- docker/install-docker-compose
1411
- run:
1512
name: Run Pact Broker
1613
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
2324

2425
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"
2832

2933
orbs:
30-
maven: circleci/[email protected].0
34+
maven: circleci/[email protected].1
3135
docker: circleci/[email protected]
3236

3337
workflows:
3438
maven_test:
3539
jobs:
36-
- maven/test:
37-
executor: j8
38-
- build:
40+
- analyze:
3941
context: SonarCloud

docker-compose.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@ services:
55
image: postgres
66
healthcheck:
77
test: psql postgres --command "select 1" -U postgres
8-
volumes:
9-
- postgres-volume:/var/lib/postgresql/data
108
environment:
119
POSTGRES_USER: postgres
1210
POSTGRES_PASSWORD: password
1311
POSTGRES_DB: postgres
12+
ports:
13+
- "5432:5432"
1414

1515
pact-broker:
1616
image: pactfoundation/pact-broker:2.105.0.1
1717
ports:
1818
- "9292:9292"
1919
depends_on:
2020
- postgres
21+
links:
22+
- postgres
2123
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
2428
PACT_BROKER_LOG_LEVEL: INFO
2529
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"

pom.xml

+13
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,17 @@
1717
<module>performance-tests</module>
1818
</modules>
1919

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+
2033
</project>

trip-management/pom.xml

-9
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,6 @@
7171
<version>3.5.21</version>
7272
<configuration>
7373
<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>-->
8374
</configuration>
8475
</plugin>
8576
<plugin>

0 commit comments

Comments
 (0)