Build and validate OpenAPI YAML description in CI
This commit is contained in:
parent
077d6fdc4b
commit
8eba9d7981
1 changed files with 24 additions and 0 deletions
|
|
@ -102,6 +102,27 @@ pytest:
|
||||||
- tags
|
- tags
|
||||||
- web
|
- web
|
||||||
|
|
||||||
|
openapi:
|
||||||
|
stage: testing
|
||||||
|
image: python:3.7
|
||||||
|
retry: 1
|
||||||
|
|
||||||
|
<<: *python-install
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ofm-generate-openapi -o docs/build/swagger.yaml --validate
|
||||||
|
artifacts:
|
||||||
|
name: "openapi"
|
||||||
|
expire_in: 1 week
|
||||||
|
paths:
|
||||||
|
- "./docs/build/swagger.yaml"
|
||||||
|
|
||||||
|
only:
|
||||||
|
- branches
|
||||||
|
- merge_requests
|
||||||
|
- tags
|
||||||
|
- web
|
||||||
|
|
||||||
# JavaScript linting with ESLint (via Vue CLI)
|
# JavaScript linting with ESLint (via Vue CLI)
|
||||||
eslint:
|
eslint:
|
||||||
stage: analysis
|
stage: analysis
|
||||||
|
|
@ -146,6 +167,7 @@ package:
|
||||||
stage: package
|
stage: package
|
||||||
dependencies:
|
dependencies:
|
||||||
- build
|
- build
|
||||||
|
- openapi
|
||||||
|
|
||||||
image: ubuntu:latest
|
image: ubuntu:latest
|
||||||
|
|
||||||
|
|
@ -154,9 +176,11 @@ package:
|
||||||
- mkdir -p dist
|
- mkdir -p dist
|
||||||
- tar -c --exclude-vcs --exclude-from .tarignore -vzf dist/openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz .
|
- tar -c --exclude-vcs --exclude-from .tarignore -vzf dist/openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz .
|
||||||
- tar -c --exclude-vcs --exclude-from .tarignore -vzf dist/openflexure-microscope-webapp-${CI_COMMIT_REF_NAME}.tar.gz ./openflexure_microscope/api/static/dist/
|
- tar -c --exclude-vcs --exclude-from .tarignore -vzf dist/openflexure-microscope-webapp-${CI_COMMIT_REF_NAME}.tar.gz ./openflexure_microscope/api/static/dist/
|
||||||
|
- cp docs/build/swagger.yaml dist/openflexure-microscope-api-${CI_COMMIT_REF_NAME}.yaml
|
||||||
- cd dist/
|
- cd dist/
|
||||||
- sha256sum openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz > openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz.sha256
|
- sha256sum openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz > openflexure-microscope-server-${CI_COMMIT_REF_NAME}.tar.gz.sha256
|
||||||
- sha256sum openflexure-microscope-webapp-${CI_COMMIT_REF_NAME}.tar.gz > openflexure-microscope-webapp-${CI_COMMIT_REF_NAME}.tar.gz.sha256
|
- sha256sum openflexure-microscope-webapp-${CI_COMMIT_REF_NAME}.tar.gz > openflexure-microscope-webapp-${CI_COMMIT_REF_NAME}.tar.gz.sha256
|
||||||
|
- sha256sum openflexure-microscope-api-${CI_COMMIT_REF_NAME}.yaml > openflexure-microscope-api-${CI_COMMIT_REF_NAME}.yaml.sha256
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
name: "dist"
|
name: "dist"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue