This repository was archived by the owner on Dec 25, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathconfig.yml
157 lines (157 loc) · 5.67 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
version: 2.1
commands: # a reusable command with parameters
command_build_and_test:
parameters:
jobId:
default: "unset"
type: string
steps:
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
# In many cases you can simplify this from what is generated here.
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# Show jobId
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_JOB_ID="<<parameters.jobId>>"' >> $BASH_ENV
- run: ./.circleci/parallel.sh
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results
command_docker_build_and_test:
parameters:
jobId:
default: "unset"
type: string
steps:
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
# In many cases you can simplify this from what is generated here.
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_JOB_ID="<<parameters.jobId>>"' >> $BASH_ENV
- run: ./.circleci/parallel.sh
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
- store_test_results:
path: /tmp/circleci-test-results
# Save artifacts
- store_artifacts:
path: /tmp/circleci-artifacts
- store_artifacts:
path: /tmp/circleci-test-results
jobs:
ensureSamplesAndGeneratorDocsUpToDate:
docker:
- image: cimg/openjdk:11.0.22
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- restore_cache:
keys:
- buildCommandLineTool
- command_build_and_test:
jobId: "ensureSamplesAndGeneratorDocsUpToDate"
- save_cache:
key: buildCommandLineTool
paths:
- ~/.m2
mvnCleanInstall:
docker:
- image: cimg/openjdk:11.0.22
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- restore_cache:
keys:
- buildCommandLineTool
- command_build_and_test:
jobId: "mvnCleanInstall"
- save_cache:
key: buildCommandLineTool
paths:
- ~/.m2
testPython38ClientSamples:
docker:
- image: python:3.8
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- checkout
- command_docker_build_and_test:
jobId: "testPythonClientSamples"
testPython39ClientSamples:
docker:
- image: python:3.9
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- checkout
- command_docker_build_and_test:
jobId: "testPythonClientSamples"
testJava17ClientSamples:
docker:
- image: cimg/openjdk:17.0.9
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- restore_cache:
keys:
- javaClientMavenCache
- command_build_and_test:
jobId: "testJava17ClientSamples"
- save_cache:
key: javaClientMavenCache
paths:
- ~/.m2
testKotlinClientSamples:
docker:
- image: cimg/openjdk:17.0.9
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- command_build_and_test:
jobId: "testKotlinClientSamples"
workflows:
version: 2
build:
jobs:
- ensureSamplesAndGeneratorDocsUpToDate
- mvnCleanInstall
- testPython38ClientSamples
- testPython39ClientSamples
- testJava17ClientSamples
- testKotlinClientSamples