Skip to content
Snippets Groups Projects
Verified Commit 31a0ff02 authored by Martin Weise's avatar Martin Weise
Browse files

Prepare better script, go for extending of runner for now

parent 04e4f0be
Branches
Tags
No related merge requests found
#!/bin/bash
function generate_docs {
echo "==================================================="
echo "Building DOCS for version $1 on branch $2"
echo "==================================================="
git checkout "$2"
pip install -r ./requirements.txt
mkdir -p ./final
if [ "$1" = "latest" ]; then
sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" .docs/redirect.html
cp ./.docs/redirect.html ./final/index.html
fi
find .docs/ -type f -exec sed -i -e "s/__APPVERSION__/$1/g" {} \;
find .docs/ -type f -exec sed -i -e "s/__CHARTVERSION__/$1/g" {} \;
mkdocs build && cp -r ./site "./final/$1"
cp -r "./swagger/$1" "./final/$1/swagger"
}
function generate_api {
echo "==================================================="
echo "Building API for version $1 on branch $2"
echo "==================================================="
git checkout "$2"
bash .docs/.swagger/swagger-site.sh
find ./site -type f -exec sed -i -e "s/__APPVERSION__/$1/g" {} \;
mkdir -p "./swagger/$1"
cp -r ./site/* "./swagger/$1/"
}
# usage
if [ -z "$v1_TAGS" ]; then
echo "Variable v1_TAGS not set"
exit 1
fi
tags=(${v1_TAGS//,/ })
# usage
if [ -z "$APP_VERSION" ]; then
echo "Variable APP_VERSION not set"
exit 2
fi
echo "APP_VERSION=$APP_VERSION"
for i in "${!tags[@]}"; do
version="${tags[i]}"
echo " ~> $version"
done
echo " ~> latest"
# ensure branches exist on machine
git fetch
# tags
for i in "${!tags[@]}"; do
version="${tags[i]}"
generate_api "$version" "v$version"
generate_docs "$version" "v$version"
done
# master
generate_api "latest" "master"
generate_docs "latest" "master"
......@@ -9,6 +9,7 @@ ready
schema.xsd
final/
build/
swagger/
# docs
.docs/.swagger/dist/
......
......@@ -588,7 +588,13 @@ build-api-1.4:
- release-v1.4
script:
- apk add bash git maven
- git fetch && git checkout release-v1.4
- git fetch
- git checkout v1.4.0
- bash .docs/.swagger/swagger-site.sh
- find ./site -type f -exec sed -i -e "s/__APPVERSION__/1.4.0/g" {} \;
- mkdir -p ./swagger/1.4.0
- cp -r ./site/* ./swagger/1.4.0/
- git checkout release-v1.4
- bash .docs/.swagger/swagger-site.sh
- find ./site -type f -exec sed -i -e "s/__APPVERSION__/${APP_VERSION}/g" {} \;
- mkdir -p ./swagger/${APP_VERSION}
......@@ -696,7 +702,16 @@ docs-1.4:
- release-v1.4
script:
- apt-get update && apt-get install -y git make sed wget
- git fetch && git checkout release-v1.4
- git fetch
- git checkout v1.4.0
- pip install -r ./requirements.txt
- wget https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/.docs/overrides/main.html -O .docs/overrides/main.html -q
- mkdir -p ./final
- find .docs/ -type f -exec sed -i -e "s/__APPVERSION__/1.4.0/g" {} \;
- find .docs/ -type f -exec sed -i -e "s/__CHARTVERSION__/1.4.0/g" {} \;
- mkdocs build && cp -r ./site ./final/1.4.0
- cp -r ./swagger/${APP_VERSION} ./final/1.4.0/swagger
- git checkout release-v1.4
- pip install -r ./requirements.txt
- wget https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services/-/raw/dev/.docs/overrides/main.html -O .docs/overrides/main.html -q
- mkdir -p ./final
......
Name Stmts Miss Cover
--------------------------------------------------------------------------------------------
/usr/lib/python3/dist-packages/six.py 504 247 51%
/usr/local/lib/python3.9/dist-packages/anyio/__init__.py 67 0 100%
/usr/local/lib/python3.9/dist-packages/anyio/_core/__init__.py 0 0 100%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_eventloop.py 62 38 39%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_exceptions.py 16 3 81%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_fileio.py 306 161 47%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_resources.py 7 3 57%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_signals.py 7 1 86%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_sockets.py 207 160 23%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_streams.py 16 8 50%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_subprocesses.py 38 27 29%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_synchronization.py 241 145 40%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_tasks.py 53 21 60%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_testing.py 29 15 48%
/usr/local/lib/python3.9/dist-packages/anyio/_core/_typedattr.py 34 10 71%
/usr/local/lib/python3.9/dist-packages/anyio/abc/__init__.py 44 0 100%
/usr/local/lib/python3.9/dist-packages/anyio/abc/_eventloop.py 169 43 75%
/usr/local/lib/python3.9/dist-packages/anyio/abc/_resources.py 12 2 83%
/usr/local/lib/python3.9/dist-packages/anyio/abc/_sockets.py 76 25 67%
/usr/local/lib/python3.9/dist-packages/anyio/abc/_streams.py 55 10 82%
/usr/local/lib/python3.9/dist-packages/anyio/abc/_subprocesses.py 29 0 100%
/usr/local/lib/python3.9/dist-packages/anyio/abc/_tasks.py 27 3 89%
/usr/local/lib/python3.9/dist-packages/anyio/abc/_testing.py 18 2 89%
/usr/local/lib/python3.9/dist-packages/anyio/from_thread.py 180 127 29%
/usr/local/lib/python3.9/dist-packages/anyio/lowlevel.py 79 41 48%
/usr/local/lib/python3.9/dist-packages/anyio/pytest_plugin.py 95 65 32%
/usr/local/lib/python3.9/dist-packages/anyio/streams/__init__.py 0 0 100%
/usr/local/lib/python3.9/dist-packages/anyio/streams/memory.py 133 80 40%
/usr/local/lib/python3.9/dist-packages/anyio/streams/stapled.py 64 29 55%
/usr/local/lib/python3.9/dist-packages/anyio/streams/tls.py 139 85 39%
/usr/local/lib/python3.9/dist-packages/anyio/to_thread.py 10 2 80%
/usr/local/lib/python3.9/dist-packages/gunicorn/__init__.py 4 0 100%
/usr/local/lib/python3.9/dist-packages/gunicorn/config.py 1094 275 75%
/usr/local/lib/python3.9/dist-packages/gunicorn/errors.py 8 3 62%
/usr/local/lib/python3.9/dist-packages/gunicorn/http/__init__.py 3 0 100%
/usr/local/lib/python3.9/dist-packages/gunicorn/http/body.py 209 184 12%
/usr/local/lib/python3.9/dist-packages/gunicorn/http/errors.py 70 30 57%
/usr/local/lib/python3.9/dist-packages/gunicorn/http/message.py 239 209 13%
/usr/local/lib/python3.9/dist-packages/gunicorn/http/parser.py 29 19 34%
/usr/local/lib/python3.9/dist-packages/gunicorn/http/unreader.py 56 43 23%
/usr/local/lib/python3.9/dist-packages/gunicorn/http/wsgi.py 247 211 15%
/usr/local/lib/python3.9/dist-packages/gunicorn/reloader.py 78 55 29%
/usr/local/lib/python3.9/dist-packages/gunicorn/util.py 367 294 20%
/usr/local/lib/python3.9/dist-packages/gunicorn/workers/__init__.py 1 0 100%
/usr/local/lib/python3.9/dist-packages/gunicorn/workers/base.py 170 140 18%
/usr/local/lib/python3.9/dist-packages/gunicorn/workers/workertmp.py 33 21 36%
/usr/local/lib/python3.9/dist-packages/simplejson/__init__.py 80 57 29%
/usr/local/lib/python3.9/dist-packages/simplejson/compat.py 29 16 45%
/usr/local/lib/python3.9/dist-packages/simplejson/decoder.py 227 180 21%
/usr/local/lib/python3.9/dist-packages/simplejson/encoder.py 412 358 13%
/usr/local/lib/python3.9/dist-packages/simplejson/errors.py 29 23 21%
/usr/local/lib/python3.9/dist-packages/simplejson/raw_json.py 3 1 67%
/usr/local/lib/python3.9/dist-packages/simplejson/scanner.py 64 53 17%
/usr/local/lib/python3.9/dist-packages/sniffio/__init__.py 3 0 100%
/usr/local/lib/python3.9/dist-packages/sniffio/_impl.py 33 22 33%
/usr/local/lib/python3.9/dist-packages/sniffio/_version.py 1 0 100%
/usr/local/lib/python3.9/dist-packages/socks.py 445 355 20%
/usr/local/lib/python3.9/dist-packages/wrapt/__init__.py 7 0 100%
/usr/local/lib/python3.9/dist-packages/wrapt/arguments.py 16 13 19%
/usr/local/lib/python3.9/dist-packages/wrapt/decorators.py 192 105 45%
/usr/local/lib/python3.9/dist-packages/wrapt/importer.py 126 99 21%
/usr/local/lib/python3.9/dist-packages/wrapt/wrappers.py 508 341 33%
--------------------------------------------------------------------------------------------
TOTAL 7500 4460 41%
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment