forked from linkedin/cruise-control
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
91 lines (88 loc) · 2.79 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
86
87
88
89
90
91
version: 2.1
jobs:
build-multi-arch:
parameters:
platform:
type: string
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1g"
machine:
image: ubuntu-2004:202107-02
steps:
- checkout
- run: |
export DOCKER_CLI_EXPERIMENTAL=enabled
docker run --rm --privileged tonistiigi/binfmt:latest --install all
sudo apt update
sudo apt install realpath -y
LOCAL_PATH=$(realpath ${CIRCLE_WORKING_DIRECTORY})
docker run --rm \
--platform << parameters.platform >> \
--name qemu-cross-<< parameters.platform >> \
--mount type=bind,source=${LOCAL_PATH},target=/github_workspace \
--workdir /github_workspace \
<< parameters.platform >>/eclipse-temurin:11-jdk-focal uname -a; ./gradlew --no-daemon clean javadoc; ./gradlew --max-workers=1 --no-daemon analyze; ./gradlew --no-daemon -PmaxParallelForks=1 build
build:
environment:
_JAVA_OPTIONS: "-Xms512m -Xmx1g"
working_directory: ~/workspace
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
- run:
command: ./gradlew --no-daemon clean javadoc
- run:
# run static analysis tasks standalone to avoid OOME in CircleCI
command: ./gradlew --max-workers=1 --no-daemon analyze
- run:
command: ./gradlew --no-daemon -PmaxParallelForks=1 build
- save_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
paths:
- ~/.gradle
- run:
command: mkdir ~/test-results
- run:
command: find ~/workspace -type f -regex ".*/test-results/.*xml" -exec ln {} ~/test-results/ \;
- store_test_results:
path: ~/test-results
- store_artifacts:
path: ~/test-results
- store_artifacts:
path: build/libs
publish:
working_directory: ~/workspace
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
- restore_cache:
key: dependency-cache-{{ checksum "build.gradle" }}
- run:
command: ./gradlew :artifactoryPublish :cruise-control:artifactoryPublish :cruise-control-core:artifactoryPublish :cruise-control-metrics-reporter:artifactoryPublish
workflows:
version: 2.1
build-and-publish:
jobs:
- build-multi-arch:
matrix:
parameters:
platform: ["s390x"]
filters:
tags:
only: /.*/
- build:
filters:
tags:
only: /.*/
- publish:
requires:
- build
filters:
branches:
ignore: /.*/
tags:
only: /^[0-9]+\.[0-9]+\.[0-9]+$/