@@ -2,8 +2,8 @@ version: 2.1
22commands : # a reusable command with parameters
33 command_build_and_test :
44 parameters :
5- nodeNo :
6- default : " 0 "
5+ jobId :
6+ default : " unset "
77 type : string
88 steps :
99 # Restore the dependency cache
@@ -13,17 +13,6 @@ commands: # a reusable command with parameters
1313 - source-v2-{{ .Branch }}-{{ .Revision }}
1414 - source-v2-{{ .Branch }}-
1515 - source-v2-
16- # Machine Setup
17- # 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
18- - run :
19- name : Install Headless Chrome dependencies
20- command : |
21- sudo apt-get update && sudo apt-get install -yq \
22- gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
23- libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
24- libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \
25- libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \
26- fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm1
2716 # 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.
2817 - checkout
2918 # Prepare for artifact and test results collection equivalent to how it was done on 1.0.
@@ -33,24 +22,10 @@ commands: # a reusable command with parameters
3322 # This is based on your 1.0 configuration file or project settings
3423 - run :
3524 command : java -version
36- - run :
37- command : ' sudo docker info >/dev/null 2>&1 || sudo service docker start; '
38- - run :
39- command : |-
40- printf '127.0.0.1 petstore.swagger.io
41- ' | sudo tee -a /etc/hosts
42- # - run: docker pull openapijsonschematools/openapi-petstore
43- # - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapijsonschematools/openapi-petstore
44- - run : docker pull swaggerapi/petstore
45- - run : docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
46- - run : docker ps -a
47- - run : sleep 30
48- - run : cat /etc/hosts
4925 # Test
50- - run : mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
5126 - run :
5227 name : " Setup custom environment variables"
53- command : echo 'export CIRCLE_NODE_INDEX ="<<parameters.nodeNo >>"' >> $BASH_ENV
28+ command : echo 'export CIRCLE_JOB_ID ="<<parameters.jobId >>"' >> $BASH_ENV
5429 - run : ./.circleci/parallel.sh
5530 # Save dependency cache
5631 - save_cache :
@@ -59,40 +34,33 @@ commands: # a reusable command with parameters
5934 # This is a broad list of cache paths to include many possible development environments
6035 # You can probably delete some of these entries
6136 - vendor/bundle
62- - ~/.nvm
6337 - ~/.pyenv
6438 - ~/virtualenvs
6539 - ~/.m2
6640 - ~/.ivy2
6741 - ~/.sbt
6842 - ~/.bundle
69- - ~/.go_workspace
7043 - ~/.gradle
7144 - ~/.cache/bower
7245 - " .git"
7346 - ~/.stack
74- - ~/R
7547 # save "default" cache using the key "source-v2-"
7648 - save_cache :
7749 key : source-v2-
7850 paths :
7951 # This is a broad list of cache paths to include many possible development environments
8052 # You can probably delete some of these entries
8153 - vendor/bundle
82- - ~/.nvm
8354 - ~/.pyenv
8455 - ~/virtualenvs
8556 - ~/.m2
8657 - ~/.ivy2
8758 - ~/.sbt
8859 - ~/.bundle
89- - ~/.go_workspace
9060 - ~/.gradle
9161 - ~/.cache/bower
9262 - " .git"
9363 - ~/.stack
94- - /home/circleci/OpenAPITools/openapi-json-schema-generator/samples/client/petstore/haskell-http-client/.stack-work
95- - ~/R
9664 # Teardown
9765 # 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
9866 # Save test results
@@ -105,8 +73,8 @@ commands: # a reusable command with parameters
10573 path : /tmp/circleci-test-results
10674 command_docker_build_and_test :
10775 parameters :
108- nodeNo :
109- default : " 0 "
76+ jobId :
77+ default : " unset "
11078 type : string
11179 steps :
11280 # Machine Setup
@@ -117,15 +85,9 @@ commands: # a reusable command with parameters
11785 # In many cases you can simplify this from what is generated here.
11886 # 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
11987 - run : mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
120- # This is based on your 1.0 configuration file or project settings
121- # - run:
122- # command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
123- # - run:
124- # Test
125- # - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
12688 - run :
12789 name : " Setup custom environment variables"
128- command : echo 'export CIRCLE_NODE_INDEX ="<<parameters.nodeNo >>"' >> $BASH_ENV
90+ command : echo 'export CIRCLE_JOB_ID ="<<parameters.jobId >>"' >> $BASH_ENV
12991 - run : ./.circleci/parallel.sh
13092 # Teardown
13193 # 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
@@ -138,18 +100,7 @@ commands: # a reusable command with parameters
138100 - store_artifacts :
139101 path : /tmp/circleci-test-results
140102jobs :
141- node0 :
142- machine :
143- image : ubuntu-2004:202201-02
144- working_directory : ~/OpenAPITools/openapi-json-schema-generator
145- shell : /bin/bash --login
146- environment :
147- CIRCLE_ARTIFACTS : /tmp/circleci-artifacts
148- CIRCLE_TEST_REPORTS : /tmp/circleci-test-results
149- steps :
150- - command_build_and_test :
151- nodeNo : " 0"
152- node1 :
103+ ensureSamplesAndGeneratorDocsUpToDate :
153104 machine :
154105 image : ubuntu-2004:202201-02
155106 working_directory : ~/OpenAPITools/openapi-json-schema-generator
@@ -159,8 +110,8 @@ jobs:
159110 CIRCLE_TEST_REPORTS : /tmp/circleci-test-results
160111 steps :
161112 - command_build_and_test :
162- nodeNo : " 1 "
163- node2 :
113+ jobId : " ensureSamplesAndGeneratorDocsUpToDate "
114+ mvnCleanInstall :
164115 machine :
165116 image : ubuntu-2004:202201-02
166117 working_directory : ~/OpenAPITools/openapi-json-schema-generator
@@ -170,20 +121,8 @@ jobs:
170121 CIRCLE_TEST_REPORTS : /tmp/circleci-test-results
171122 steps :
172123 - command_build_and_test :
173- nodeNo : " 2"
174- node3 :
175- machine :
176- image : ubuntu-2004:202201-02
177- working_directory : ~/OpenAPITools/openapi-json-schema-generator
178- shell : /bin/bash --login
179- environment :
180- CIRCLE_ARTIFACTS : /tmp/circleci-artifacts
181- CIRCLE_TEST_REPORTS : /tmp/circleci-test-results
182- steps :
183- - checkout
184- - command_build_and_test :
185- nodeNo : " 3"
186- node4 :
124+ jobId : " mvnCleanInstall"
125+ testPythonClientSamples :
187126 docker :
188127 - image : python:3.8
189128 working_directory : ~/OpenAPITools/openapi-json-schema-generator
@@ -194,13 +133,11 @@ jobs:
194133 steps :
195134 - checkout
196135 - command_docker_build_and_test :
197- nodeNo : " 4 "
136+ jobId : " testPythonClientSamples "
198137workflows :
199138 version : 2
200139 build :
201140 jobs :
202- - node0
203- - node1
204- - node2
205- - node3
206- - node4
141+ - ensureSamplesAndGeneratorDocsUpToDate
142+ - mvnCleanInstall
143+ - testPythonClientSamples
0 commit comments