-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.yml
85 lines (75 loc) · 3.31 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Use the latest 2.1 version of CircleCI pipeline process engine.
# See: https://circleci.com/docs/configuration-reference
version: 2.1
# Define jobs to be invoked later in a workflow.
# See: https://circleci.com/docs/jobs-steps/#jobs-overview & https://circleci.com/docs/configuration-reference/#jobs
jobs:
build_test_and_save_logs:
# Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images
# from CircleCI's Developer Hub.
# See: https://circleci.com/docs/executor-intro/ & https://circleci.com/docs/configuration-reference/#executor-job
executor: ubuntu_executor
# Add steps to the job
# See: https://circleci.com/docs/jobs-steps/#steps-overview & https://circleci.com/docs/configuration-reference/#steps
steps:
- run:
name: Install JDK 17
command: |
sudo apt update;
sudo apt install -y openjdk-17-jdk
- checkout
- restore_cache:
name: Restore Gradle dependencies
keys:
- v1-dependencies-{{ checksum "build.gradle" }}-{{ checksum "buildSrc/build.gradle" }}-{{ checksum "connect-smt-lib/build.gradle" }}-{{ checksum "connect-spring-boot-app/build.gradle" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Resolve Gradle dependencies
command: ./gradlew jacoco-report-aggregation:dependencies
- save_cache:
name: Save Gradle dependencies
paths:
- ~/.gradle
key: v1-dependencies-{{ checksum "build.gradle" }}-{{ checksum "buildSrc/build.gradle" }}-{{ checksum "connect-smt-lib/build.gradle" }}-{{ checksum "connect-spring-boot-app/build.gradle" }}
- run:
name: Build with Gradle Wrapper
command: ./gradlew build --console=verbose
- run:
name: Save test results for the "Tests" tab
command: |
mkdir -p ~/test-results/junit/
find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} ~/test-results/junit/ \;
when: always
- store_test_results:
path: ~/test-results
# Save tests/JaCoCo reports/logs
- store_artifacts:
name: Save SMT lib reports
path: connect-smt-lib/build/reports/tests
destination: reports/connect-smt-lib
- store_artifacts:
name: Save Spring Boot App reports
path: connect-spring-boot-app/build/reports/tests
destination: reports/connect-spring-boot-app
- store_artifacts:
name: Save JaCoCo Aggregate report
path: jacoco-report-aggregation/build/reports
destination: reports/jacoco-report-aggregation
- store_artifacts:
name: Save Kafka Connect container logs
path: connect-spring-boot-app/build/container-logs/connect.log
destination: logs/connect.log
# Orchestrate jobs using workflows
# See: https://circleci.com/docs/workflows/ & https://circleci.com/docs/configuration-reference/#workflows
workflows:
build_test_and_save_logs:
# Inside the workflow, you define the jobs you want to run.
jobs:
- build_test_and_save_logs
executors:
ubuntu_executor:
machine:
image: ubuntu-2004:2024.01.2
docker_layer_caching: true
resource_class: large