Skip to content
Snippets Groups Projects

Add API documentation

Merged Konrad Mohrfeldt requested to merge feature/api-docs into master
1 file
+ 23
3
Compare changes
  • Side-by-side
  • Inline
+ 23
3
@@ -7,8 +7,28 @@
- Dockerfile
stages:
- build
- release
build-openapi-scheme:
image: python:3.9-alpine
variables:
SECRET_KEY: not-a-very-secret-key
DJANGO_SETTINGS_MODULE: steering.settings
# steering.settings switches to sqlite if the VIRTUAL_ENV environment
# variable is present. It’s probably a good idea to refactor this to
# something more explicit.
VIRTUAL_ENV: 1
before_script:
- apk add gcc musl-dev zlib-dev jpeg-dev libmagic
- pip install -r requirements.txt
script:
- python3 -m django spectacular --validate --lang en --file openapi.yaml
artifacts:
paths:
- openapi.yaml
docker-push:
# Use the official docker image.
image: docker:latest
@@ -32,16 +52,16 @@ docker-push:
fi
# TODO: maybe isolate docker build and docker push
- docker push "$AURA_IMAGE_NAME" --all-tags
rules:
rules:
- *release-rules
# every commit on master/main branch should trigger a push to docker-hub as unstable without a release
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
exists:
- Dockerfile
release_job:
stage: release
needs:
needs:
- docker-push
image: registry.gitlab.com/gitlab-org/release-cli:latest
rules: *release-rules
Loading