pipeline siivous ja testikattavuuden nosto (#9)
CI / load-config (push) Successful in 16s
CI / feature (push) Has been skipped
ci-cucumber Cucumber tests passed
ci-bats Bats tests
ci-build Build complete
CI / main (push) Successful in 2m23s

Co-authored-by: moilanik <niko.moilanen@tietoevry.com>
Reviewed-on: #9
This commit is contained in:
2026-06-14 03:26:44 +03:00
parent a1d1f1e5ab
commit c422825bf0
33 changed files with 779 additions and 302 deletions
+11 -13
View File
@@ -1,28 +1,26 @@
#!/usr/bin/env bash
set -euo pipefail
[ -z "${GITEA_API_URL:-}" ] && echo "ERROR: GITEA_API_URL is not set" >&2 && exit 1
[ -z "${GITEA_TOKEN:-}" ] && echo "ERROR: GITEA_TOKEN is not set" >&2 && exit 1
STATE="${1:-}"
DESCRIPTION="${2:-}"
URL="${3:-}"
KEY="${4:-commit-${GITHUB_SHA:0:8}}"
ROOT_COMMIT="${5:-}"
ROOT_REPO="${6:-}"
KEY="${3:-commit-${GITHUB_SHA:0:8}}"
SUITE="${4:-}"
[ -z "$STATE" ] && echo "ERROR: state argument is required" >&2 && exit 1
[ -z "$DESCRIPTION" ] && echo "ERROR: description argument is required" >&2 && exit 1
[ -z "$URL" ] && echo "ERROR: url argument is required" >&2 && exit 1
[ -z "${GITEA_API_URL:-}" ] && echo "ERROR: GITEA_API_URL is not set" >&2 && exit 1
[ -z "${GITEA_TOKEN:-}" ] && echo "ERROR: GITEA_TOKEN is not set" >&2 && exit 1
if [ -n "$ROOT_COMMIT" ] && [ -n "$ROOT_REPO" ]; then
REPO="$ROOT_REPO"
COMMIT="$ROOT_COMMIT"
if [ -n "$SUITE" ]; then
SUITE="${SUITE%/}/"
URL="${GIT_PAGES_URL}/${GITHUB_REPOSITORY}/reports/${GITHUB_SHA:0:8}/${SUITE}"
else
REPO="${GITHUB_REPOSITORY:-}"
COMMIT="${GITHUB_SHA:-}"
URL="${GITEA_API_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
fi
REPO="${ROOT_REPO:-${GITHUB_REPOSITORY:-}}"
COMMIT="${ROOT_COMMIT:-${GITHUB_SHA:-}}"
[ -z "$REPO" ] && echo "ERROR: GITHUB_REPOSITORY is not set" >&2 && exit 1
[ -z "$COMMIT" ] && echo "ERROR: GITHUB_SHA is not set" >&2 && exit 1