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

Included coverage for website

parent f3981f84
No related branches found
No related tags found
6 merge requests!345Updated docs and endpoints:,!341Fixed mapping problem where UK and FK share columns they are inserted,!339Fixed mapping problem where UK and FK share columns they are inserted,!338Fixed mapping problem where UK and FK share columns they are inserted,!334Fixed mapping problem where UK and FK share columns they are inserted,!333Fixed mapping problem where UK and FK share columns they are inserted
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="124" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<mask id="anybadge_1">
<rect width="124" height="20" rx="3" fill="#fff"/>
</mask>
<g mask="url(#anybadge_1)">
<path fill="#555" d="M0 0h65v20H0z"/>
<path fill="#A9A9A9" d="M65 0h59v20H65z"/>
<path fill="url(#b)" d="M0 0h124v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="33.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
<text x="32.5" y="14">coverage</text>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
<text x="95.5" y="15" fill="#010101" fill-opacity=".3">unknown</text>
<text x="94.5" y="14">unknown</text>
</g>
</svg>
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
author: Martin Weise author: Martin Weise
--- ---
[![CI/CD Pipeline](./images/pipeline.svg)](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } [![CI/CD Status](./images/pipeline.svg)](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 }
[![CI/CD Coverage](./images/coverage.svg)](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 }
[![GitLab Release](https://img.shields.io/gitlab/v/release/fair-data-austria-db-repository%2Ffda-services?gitlab_url=https%3A%2F%2Fgitlab.phaidra.org&display_name=release&style=flat&cacheSeconds=3600)](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } [![GitLab Release](https://img.shields.io/gitlab/v/release/fair-data-austria-db-repository%2Ffda-services?gitlab_url=https%3A%2F%2Fgitlab.phaidra.org&display_name=release&style=flat&cacheSeconds=3600)](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 }
[![Image Pulls](https://img.shields.io/docker/pulls/dbrepo/data-service?style=flat&cacheSeconds=3600)](https://hub.docker.com/u/dbrepo){ tabindex=-1 } [![Image Pulls](https://img.shields.io/docker/pulls/dbrepo/data-service?style=flat&cacheSeconds=3600)](https://hub.docker.com/u/dbrepo){ tabindex=-1 }
[![GitLab License](https://img.shields.io/gitlab/license/fair-data-austria-db-repository%2Ffda-services?gitlab_url=https%3A%2F%2Fgitlab.phaidra.org%2F&style=flat&cacheSeconds=3600)](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } [![GitLab License](https://img.shields.io/gitlab/license/fair-data-austria-db-repository%2Ffda-services?gitlab_url=https%3A%2F%2Fgitlab.phaidra.org%2F&style=flat&cacheSeconds=3600)](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 }
......
...@@ -35,9 +35,6 @@ stages: ...@@ -35,9 +35,6 @@ stages:
build-metadata-service: build-metadata-service:
image: maven:3-openjdk-17 image: maven:3-openjdk-17
stage: build stage: build
except:
refs:
- /^release-.*/
script: script:
- "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests" - "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests"
# Compiled classes are needed for SonarQube in later stages # Compiled classes are needed for SonarQube in later stages
...@@ -56,9 +53,6 @@ build-metadata-service: ...@@ -56,9 +53,6 @@ build-metadata-service:
build-analyse-service: build-analyse-service:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
stage: build stage: build
except:
refs:
- /^release-.*/
variables: variables:
PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile"
script: script:
...@@ -68,9 +62,6 @@ build-analyse-service: ...@@ -68,9 +62,6 @@ build-analyse-service:
build-data-db-sidecar: build-data-db-sidecar:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
stage: build stage: build
except:
refs:
- /^release-.*/
variables: variables:
PIPENV_PIPFILE: "./dbrepo-data-db/sidecar/Pipfile" PIPENV_PIPFILE: "./dbrepo-data-db/sidecar/Pipfile"
script: script:
...@@ -80,9 +71,6 @@ build-data-db-sidecar: ...@@ -80,9 +71,6 @@ build-data-db-sidecar:
build-lib: build-lib:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
stage: build stage: build
except:
refs:
- /^release-.*/
variables: variables:
PIPENV_PIPFILE: "./lib/python/Pipfile" PIPENV_PIPFILE: "./lib/python/Pipfile"
script: script:
...@@ -92,9 +80,6 @@ build-lib: ...@@ -92,9 +80,6 @@ build-lib:
build-data-service: build-data-service:
image: maven:3-openjdk-17 image: maven:3-openjdk-17
stage: build stage: build
except:
refs:
- /^release-.*/
needs: needs:
- build-metadata-service - build-metadata-service
dependencies: dependencies:
...@@ -114,18 +99,12 @@ build-data-service: ...@@ -114,18 +99,12 @@ build-data-service:
build-ui: build-ui:
image: oven/bun:1.0.26-alpine image: oven/bun:1.0.26-alpine
stage: build stage: build
except:
refs:
- /^release-.*/
script: script:
- "cd ./dbrepo-ui && bun install && bun run build" - "cd ./dbrepo-ui && bun install && bun run build"
build-search-service: build-search-service:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
stage: build stage: build
except:
refs:
- /^release-.*/
script: script:
- "pip install pipenv" - "pip install pipenv"
- "cd dbrepo-search-service && pipenv install --system --deploy" - "cd dbrepo-search-service && pipenv install --system --deploy"
...@@ -133,9 +112,6 @@ build-search-service: ...@@ -133,9 +112,6 @@ build-search-service:
build-docker: build-docker:
image: docker.io/docker:24-dind image: docker.io/docker:24-dind
stage: build stage: build
except:
refs:
- /^release-.*/
before_script: before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL
script: script:
...@@ -146,9 +122,6 @@ build-docker: ...@@ -146,9 +122,6 @@ build-docker:
build-helm: build-helm:
image: docker.io/docker:24-dind image: docker.io/docker:24-dind
stage: build stage: build
except:
refs:
- /^release-.*/
before_script: before_script:
- echo "$CI_GPG_KEYRING" | base64 -d > ./secring.gpg - echo "$CI_GPG_KEYRING" | base64 -d > ./secring.gpg
- echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL
...@@ -205,9 +178,6 @@ verify-install-script: ...@@ -205,9 +178,6 @@ verify-install-script:
lint-helm-chart: lint-helm-chart:
image: docker.io/alpine:3.20 image: docker.io/alpine:3.20
stage: lint stage: lint
except:
refs:
- /^release-.*/
needs: needs:
- build-metadata-service - build-metadata-service
dependencies: dependencies:
...@@ -220,9 +190,6 @@ lint-helm-chart: ...@@ -220,9 +190,6 @@ lint-helm-chart:
test-metadata-service: test-metadata-service:
image: maven:3-openjdk-17 image: maven:3-openjdk-17
stage: test stage: test
except:
refs:
- /^release-.*/
needs: needs:
- build-metadata-service - build-metadata-service
dependencies: dependencies:
...@@ -243,9 +210,6 @@ test-metadata-service: ...@@ -243,9 +210,6 @@ test-metadata-service:
test-data-service: test-data-service:
image: maven:3-openjdk-17 image: maven:3-openjdk-17
stage: test stage: test
except:
refs:
- /^release-.*/
needs: needs:
- build-data-service - build-data-service
dependencies: dependencies:
...@@ -266,9 +230,6 @@ test-data-service: ...@@ -266,9 +230,6 @@ test-data-service:
test-analyse-service: test-analyse-service:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
stage: test stage: test
except:
refs:
- /^release-.*/
variables: variables:
PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile"
needs: needs:
...@@ -293,9 +254,6 @@ test-analyse-service: ...@@ -293,9 +254,6 @@ test-analyse-service:
test-search-service: test-search-service:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
stage: test stage: test
except:
refs:
- /^release-.*/
variables: variables:
PIPENV_PIPFILE: "./dbrepo-search-service/Pipfile" PIPENV_PIPFILE: "./dbrepo-search-service/Pipfile"
needs: needs:
...@@ -320,9 +278,6 @@ test-search-service: ...@@ -320,9 +278,6 @@ test-search-service:
test-lib: test-lib:
image: docker.io/python:3.11-alpine image: docker.io/python:3.11-alpine
stage: test stage: test
except:
refs:
- /^release-.*/
variables: variables:
PIPENV_PIPFILE: "./lib/python/Pipfile" PIPENV_PIPFILE: "./lib/python/Pipfile"
needs: needs:
...@@ -404,9 +359,6 @@ release-helm: ...@@ -404,9 +359,6 @@ release-helm:
refs: refs:
- /^release-.*/ - /^release-.*/
when: manual when: manual
except:
refs:
- release-latest
before_script: before_script:
- "docker logout ${CI_REGISTRY_URL}" - "docker logout ${CI_REGISTRY_URL}"
- "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}"
......
#!/bin/bash #!/bin/bash
GITLAB_URL="https://gitlab.phaidra.org" GITLAB_URL="https://gitlab.phaidra.org"
PIPELINE_ID=$(curl -fsSL -H "PRIVATE-TOKEN: ${CI_TOKEN}" "${GITLAB_URL}/api/v4/projects/450/pipelines?ref=${CI_COMMIT_BRANCH}" | jq '[.[]|select(.)][0].id') RAW=$(curl -fsSL -H "PRIVATE-TOKEN: ${CI_TOKEN}" "${GITLAB_URL}/api/v4/projects/450/pipelines/latest?ref=${CI_COMMIT_BRANCH}")
echo "[INFO] pipeline id: ${PIPELINE_ID}" anybadge --label pipeline --value "$(echo ${RAW} | jq --raw-output .detailed_status.text)" failed=red passed=green canceled=darkgray > /tmp/pipeline.svg
STATUS_RAW=$(curl -fsSL -H "PRIVATE-TOKEN: ${CI_TOKEN}" "${GITLAB_URL}/api/v4/projects/450/pipelines/${PIPELINE_ID}" | jq '.detailed_status') anybadge --label pipeline --value "$(echo ${RAW} | jq --raw-output .coverage)" 70=red 80=orange 90=yellow 95=green > /tmp/coverage.svg
echo "[DEBUG] response: ${STATUS_RAW}" \ No newline at end of file
anybadge --label pipeline --value "$(echo ${STATUS_RAW} | jq --raw-output .text)" failed=red passed=green canceled=darkgray > /tmp/pipeline.svg
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment