FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit f730d048 authored by Dr Rich Wareham's avatar Dr Rich Wareham
Browse files

Merge branch 'issue-24-automatic-release' into 'main'

feat: add OpenAPI schema to release artefacts

See merge request !58
parents bae3eabf 546bfabc
No related branches found
No related tags found
1 merge request!58feat: add OpenAPI schema to release artefacts
Pipeline #653151 passed with warnings
...@@ -5,6 +5,11 @@ variables: ...@@ -5,6 +5,11 @@ variables:
# the root of our repository which would otherwise signal that. # the root of our repository which would otherwise signal that.
OPENAPI_GENERATOR_ENABLED: "1" OPENAPI_GENERATOR_ENABLED: "1"
# Override the OpenAPI build artefact locations which are, in turn, added to the release-it
# configuration. We set these here explicitly so that we can curate the naming of the release
# assets.
OPENAPI_GENERATOR_SCHEMA_ARTIFACT_PATH: openapi.yaml
# We do not ship the OpenAPI schema in the repository and so the openapi:schema job needs to be # We do not ship the OpenAPI schema in the repository and so the openapi:schema job needs to be
# extended to create the schema. # extended to create the schema.
openapi:schema: openapi:schema:
......
...@@ -69,6 +69,8 @@ openapi:schema:version: ...@@ -69,6 +69,8 @@ openapi:schema:version:
image: image:
name: $OPENAPI_GENERATOR_YQ_IMAGE name: $OPENAPI_GENERATOR_YQ_IMAGE
entrypoint: [""] entrypoint: [""]
before_script:
- mkdir -p $(dirname "$OPENAPI_GENERATOR_SCHEMA_VERSION_ARTIFACT")
script: script:
- yq -r ".info.version" "$OPENAPI_GENERATOR_SCHEMA_ARTIFACT_PATH" >"$OPENAPI_GENERATOR_SCHEMA_VERSION_ARTIFACT" - yq -r ".info.version" "$OPENAPI_GENERATOR_SCHEMA_ARTIFACT_PATH" >"$OPENAPI_GENERATOR_SCHEMA_VERSION_ARTIFACT"
artifacts: artifacts:
......
...@@ -4,7 +4,10 @@ ...@@ -4,7 +4,10 @@
}, },
"gitlab": { "gitlab": {
"release": true, "release": true,
"releaseName": "${version}" "releaseName": "${version}",
"assets": [
"openapi.yml"
]
}, },
"plugins": { "plugins": {
"@release-it/conventional-changelog": { "@release-it/conventional-changelog": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment