Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into 6.0.x
Browse files Browse the repository at this point in the history
  • Loading branch information
wing328 committed Jan 30, 2022
2 parents 9c3d4ef + 3ed6343 commit c8b84c4
Show file tree
Hide file tree
Showing 4,543 changed files with 127,808 additions and 45,987 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
284 changes: 193 additions & 91 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,102 +1,204 @@
version: 2
version: 2.1
commands: # a reusable command with parameters
command_build_and_test:
parameters:
nodeNo:
default: "0"
type: string
steps:
# Restore the dependency cache
- restore_cache:
keys:
# Default branch if not
- source-v2-{{ .Branch }}-{{ .Revision }}
- source-v2-{{ .Branch }}-
- source-v2-
# 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
# This is based on your 1.0 configuration file or project settings
- run:
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
- run:
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
- run:
command: |-
printf '127.0.0.1 petstore.swagger.io
' | sudo tee -a /etc/hosts
# - run: docker pull openapitools/openapi-petstore
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
- run: docker pull swaggerapi/petstore
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- run: docker ps -a
- run: sleep 30
- run: cat /etc/hosts
# Test
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh
# Save dependency cache
- save_cache:
key: source-v2-{{ .Branch }}-{{ .Revision }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# save "default" cache using the key "source-v2-"
- save_cache:
key: source-v2-
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# 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:
nodeNo:
default: "0"
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
# This is based on your 1.0 configuration file or project settings
# - run:
# 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
# - run:
# Test
# - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_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:
build:
# docker:
# #- image: openapitools/openapi-generator
# - image: swaggerapi/petstore
# environment:
# SWAGGER_HOST=http://petstore.swagger.io
# SWAGGER_BASE_PATH=/v2
node0:
machine:
image: circleci/classic:latest
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
- command_build_and_test:
nodeNo: "0"
node1:
machine:
image: circleci/classic:latest
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
- command_build_and_test:
nodeNo: "1"
node2:
machine:
image: circleci/classic:latest
working_directory: ~/OpenAPITools/openapi-generator
parallelism: 4
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
# Restore the dependency cache
- restore_cache:
keys:
# Default branch if not
- source-v2-{{ .Branch }}-{{ .Revision }}
- source-v2-{{ .Branch }}-
- source-v2-
# 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
# This is based on your 1.0 configuration file or project settings
- run:
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
- run:
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
- run:
command: |-
printf '127.0.0.1 petstore.swagger.io
' | sudo tee -a /etc/hosts
# - run: docker pull openapitools/openapi-petstore
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapitools/openapi-petstore
- run: docker pull swaggerapi/petstore
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- run: docker ps -a
- run: sleep 30
- run: cat /etc/hosts
# Test
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run: ./CI/circle_parallel.sh
# Save dependency cache
- save_cache:
key: source-v2-{{ .Branch }}-{{ .Revision }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# save "default" cache using the key "source-v2-"
- save_cache:
key: source-v2-
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# 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_build_and_test:
nodeNo: "2"
node3:
machine:
image: circleci/classic:latest
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
- checkout
- command_build_and_test:
nodeNo: "3"
node4:
docker:
- image: fkrull/multi-python
working_directory: ~/OpenAPITools/openapi-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
DOCKER_GENERATOR_IMAGE_NAME: openapitools/openapi-generator
DOCKER_CODEGEN_CLI_IMAGE_NAME: openapitools/openapi-generator-cli
steps:
- checkout
- command_docker_build_and_test:
nodeNo: "4"
workflows:
version: 2
build:
jobs:
- node0
- node1
- node2
- node3
- node4
12 changes: 0 additions & 12 deletions .github/.test/samples.json
Original file line number Diff line number Diff line change
Expand Up @@ -710,18 +710,6 @@
"Schema: MySQL"
]
},
{
"input": "nancyfx-petstore-server-async.sh",
"matches": [
"Server: C-Sharp"
]
},
{
"input": "nancyfx-petstore-server.sh",
"matches": [
"Server: C-Sharp"
]
},
{
"input": "nodejs-petstore-google-cloud-functions.sh",
"matches": [
Expand Down
2 changes: 0 additions & 2 deletions .github/auto-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ labels:
'Server: C-Sharp':
- '\s*?\[aspnetcore\]\s*?'
- '\s*?-[gl] aspnetcore\s*?'
- '\s*?\[csharp-nancyfx\]\s*?'
- '\s*?-[gl] csharp-nancyfx\s*?'
# 'Server: Ceylon': # TODO: REMOVE UNUSED LABEL
'Server: Eiffel':
- '\s*?\[eiffel(-.*)?-server\]\s*?'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/samples-kotlin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
- samples/client/petstore/kotlin-string
- samples/client/petstore/kotlin-threetenbp
- samples/client/petstore/kotlin-uppercase-enum
- samples/client/petstore/kotlin-array-simple-string
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/samples-spring.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Samples Java Spring

on:
push:
paths:
- 'samples/server/petstore/spring*/**'
- 'samples/openapi3/server/petstore/spring*/**'
pull_request:
paths:
- 'samples/server/petstore/spring*/**'
- 'samples/openapi3/server/petstore/spring*/**'
jobs:
build:
name: Build Java Spring
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sample:
# clients
- samples/client/petstore/spring-cloud
- samples/openapi3/client/petstore/spring-cloud
- samples/client/petstore/spring-cloud-date-time
- samples/openapi3/client/petstore/spring-cloud-date-time
- samples/client/petstore/spring-stubs
- samples/openapi3/client/petstore/spring-stubs
# servers
- samples/server/petstore/spring-mvc
- samples/server/petstore/spring-mvc-default-value
- samples/server/petstore/spring-mvc-j8-async
- samples/server/petstore/spring-mvc-j8-localdatetime
- samples/server/petstore/springboot
- samples/openapi3/server/petstore/springboot
- samples/server/petstore/springboot-beanvalidation
- samples/server/petstore/springboot-useoptional
- samples/openapi3/server/petstore/springboot-useoptional
- samples/server/petstore/springboot-reactive
- samples/openapi3/server/petstore/springboot-reactive
- samples/server/petstore/springboot-implicitHeaders
- samples/openapi3/server/petstore/springboot-implicitHeaders
- samples/server/petstore/springboot-delegate
- samples/openapi3/server/petstore/springboot-delegate
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: 8
- name: Cache maven dependencies
uses: actions/[email protected]
env:
cache-name: maven-repository
with:
path: |
~/.m2
key: ${{ runner.os }}-${{ github.job }}-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
- name: Build
working-directory: ${{ matrix.sample }}
run: mvn clean package
Loading

0 comments on commit c8b84c4

Please sign in to comment.