diff --git a/.docs/images/coverage.svg b/.docs/images/coverage.svg new file mode 100644 index 0000000000000000000000000000000000000000..8d22334eb1c46b39dbdbeb37ff93c218c188173d --- /dev/null +++ b/.docs/images/coverage.svg @@ -0,0 +1,24 @@ +<?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> + diff --git a/.docs/index.md b/.docs/index.md index 3504d4fe9b4d23539fc83767d2f0af13391a1103..9142377a93fe205391fda8771f6697df3260272d 100644 --- a/.docs/index.md +++ b/.docs/index.md @@ -2,7 +2,8 @@ author: Martin Weise --- -[](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } +[](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } +[](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } [](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } [](https://hub.docker.com/u/dbrepo){ tabindex=-1 } [](https://gitlab.phaidra.org/fair-data-austria-db-repository/fda-services){ tabindex=-1 } diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 50977820552c0d04583fa8a7df7c46ad2cdce6d8..be449ca6db1495a32822e4360e6e819701277f90 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -35,9 +35,6 @@ stages: build-metadata-service: image: maven:3-openjdk-17 stage: build - except: - refs: - - /^release-.*/ script: - "mvn -f ./dbrepo-metadata-service/pom.xml clean install $MAVEN_OPTS -DskipTests" # Compiled classes are needed for SonarQube in later stages @@ -56,9 +53,6 @@ build-metadata-service: build-analyse-service: image: docker.io/python:3.11-alpine stage: build - except: - refs: - - /^release-.*/ variables: PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" script: @@ -68,9 +62,6 @@ build-analyse-service: build-data-db-sidecar: image: docker.io/python:3.11-alpine stage: build - except: - refs: - - /^release-.*/ variables: PIPENV_PIPFILE: "./dbrepo-data-db/sidecar/Pipfile" script: @@ -80,9 +71,6 @@ build-data-db-sidecar: build-lib: image: docker.io/python:3.11-alpine stage: build - except: - refs: - - /^release-.*/ variables: PIPENV_PIPFILE: "./lib/python/Pipfile" script: @@ -92,9 +80,6 @@ build-lib: build-data-service: image: maven:3-openjdk-17 stage: build - except: - refs: - - /^release-.*/ needs: - build-metadata-service dependencies: @@ -114,18 +99,12 @@ build-data-service: build-ui: image: oven/bun:1.0.26-alpine stage: build - except: - refs: - - /^release-.*/ script: - "cd ./dbrepo-ui && bun install && bun run build" build-search-service: image: docker.io/python:3.11-alpine stage: build - except: - refs: - - /^release-.*/ script: - "pip install pipenv" - "cd dbrepo-search-service && pipenv install --system --deploy" @@ -133,9 +112,6 @@ build-search-service: build-docker: image: docker.io/docker:24-dind stage: build - except: - refs: - - /^release-.*/ before_script: - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL script: @@ -146,9 +122,6 @@ build-docker: build-helm: image: docker.io/docker:24-dind stage: build - except: - refs: - - /^release-.*/ before_script: - echo "$CI_GPG_KEYRING" | base64 -d > ./secring.gpg - echo "$CI_REGISTRY_PASSWORD" | docker login --username "$CI_REGISTRY_USER" --password-stdin $CI_REGISTRY_URL @@ -205,9 +178,6 @@ verify-install-script: lint-helm-chart: image: docker.io/alpine:3.20 stage: lint - except: - refs: - - /^release-.*/ needs: - build-metadata-service dependencies: @@ -220,9 +190,6 @@ lint-helm-chart: test-metadata-service: image: maven:3-openjdk-17 stage: test - except: - refs: - - /^release-.*/ needs: - build-metadata-service dependencies: @@ -243,9 +210,6 @@ test-metadata-service: test-data-service: image: maven:3-openjdk-17 stage: test - except: - refs: - - /^release-.*/ needs: - build-data-service dependencies: @@ -266,9 +230,6 @@ test-data-service: test-analyse-service: image: docker.io/python:3.11-alpine stage: test - except: - refs: - - /^release-.*/ variables: PIPENV_PIPFILE: "./dbrepo-analyse-service/Pipfile" needs: @@ -293,9 +254,6 @@ test-analyse-service: test-search-service: image: docker.io/python:3.11-alpine stage: test - except: - refs: - - /^release-.*/ variables: PIPENV_PIPFILE: "./dbrepo-search-service/Pipfile" needs: @@ -320,9 +278,6 @@ test-search-service: test-lib: image: docker.io/python:3.11-alpine stage: test - except: - refs: - - /^release-.*/ variables: PIPENV_PIPFILE: "./lib/python/Pipfile" needs: @@ -404,9 +359,6 @@ release-helm: refs: - /^release-.*/ when: manual - except: - refs: - - release-latest before_script: - "docker logout ${CI_REGISTRY_URL}" - "echo ${CI_REGISTRY_PASSWORD} | docker login --username ${CI_REGISTRY_USER} --password-stdin ${CI_REGISTRY_URL}" diff --git a/.gitlab/gen-badge.sh b/.gitlab/gen-badge.sh index a74f59d6c2bf546f65699bdf6358580493c7943b..f02d9c4dee1b79b2c295ec45e3ba35841dc8d2c8 100644 --- a/.gitlab/gen-badge.sh +++ b/.gitlab/gen-badge.sh @@ -1,7 +1,5 @@ #!/bin/bash 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') -echo "[INFO] pipeline id: ${PIPELINE_ID}" -STATUS_RAW=$(curl -fsSL -H "PRIVATE-TOKEN: ${CI_TOKEN}" "${GITLAB_URL}/api/v4/projects/450/pipelines/${PIPELINE_ID}" | jq '.detailed_status') -echo "[DEBUG] response: ${STATUS_RAW}" -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 +RAW=$(curl -fsSL -H "PRIVATE-TOKEN: ${CI_TOKEN}" "${GITLAB_URL}/api/v4/projects/450/pipelines/latest?ref=${CI_COMMIT_BRANCH}") +anybadge --label pipeline --value "$(echo ${RAW} | jq --raw-output .detailed_status.text)" failed=red passed=green canceled=darkgray > /tmp/pipeline.svg +anybadge --label pipeline --value "$(echo ${RAW} | jq --raw-output .coverage)" 70=red 80=orange 90=yellow 95=green > /tmp/coverage.svg \ No newline at end of file