Compare commits

..

19 Commits

Author SHA1 Message Date
moilanik bcac84f2fd siistimistä, router pipelien clean
CI Main / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 24s
CI Feature / Bats tests (push) Successful in 1m26s
CI Feature / Cucumber tests (push) Successful in 1m38s
CI Main / Check existing artifact (push) Successful in 18s
CI Feature / Report Summary (push) Successful in 4s
unit-tests Bats test report
acc-tests Cucumber test report
CI Main / Bats tests (push) Successful in 1m27s
CI Main / Cucumber tests (push) Successful in 1m27s
CI Main / Build & Push Helm (push) Failing after 31s
ci-docker-build-push Docker push 0.2.22
CI Main / Build & Push Docker (push) Successful in 54s
CI Main / Update docker (push) Failing after 1s
CI Main / Move provider version tag (push) Has been skipped
CI Main / Report Summary (push) Successful in 7s
2026-06-22 09:55:25 +03:00
moilanik db9d6daebb fix
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 19s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m29s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m38s
CI Feature / Report Summary (push) Successful in 5s
2026-06-22 07:53:38 +03:00
moilanik ba16e9e4eb fix
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 23s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m23s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m29s
CI Feature / Report Summary (push) Successful in 6s
2026-06-22 07:41:32 +03:00
moilanik 6463dad6d7 testi korjaukset
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 20s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m28s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m35s
CI Feature / Report Summary (push) Successful in 5s
2026-06-22 07:15:38 +03:00
moilanik 21a6ef7ab1 fix
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 20s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m27s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m37s
CI Feature / Report Summary (push) Successful in 6s
2026-06-22 07:01:05 +03:00
moilanik 84978784fe clean up
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 20s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 26s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m25s
CI Feature / Report Summary (push) Successful in 5s
2026-06-22 06:57:09 +03:00
moilanik f58497f5e8 skill & docs
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 23s
POC GitOps E2E / e2e (push) Successful in 53s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m32s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m45s
CI Feature / Report Summary (push) Successful in 5s
2026-06-22 06:34:37 +03:00
moilanik fa57a152e4 self commit status about gitops
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 23s
acc-tests Cucumber test report
unit-tests Bats test report
CI Feature / Cucumber tests (push) Failing after 1m22s
CI Feature / Bats tests (push) Failing after 1m31s
CI Feature / Report Summary (push) Successful in 5s
POC GitOps E2E / e2e (push) Successful in 29s
2026-06-22 06:03:51 +03:00
moilanik a0cdf377f6 multi commit status support to same commit in gitops repo
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
POC GitOps E2E / e2e (push) Successful in 43s
unit-tests Bats test report
acc-tests Cucumber test report
CI Feature / Bats tests (push) Failing after 1m29s
CI Feature / Cucumber tests (push) Failing after 1m20s
CI Feature / Report Summary (push) Successful in 6s
2026-06-22 05:56:21 +03:00
moilanik 028fd748a6 multi commit status gitops puolelle
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 32s
POC GitOps E2E / e2e (push) Successful in 49s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m36s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m37s
CI Feature / Report Summary (push) Successful in 6s
2026-06-22 05:47:36 +03:00
moilanik 7f53e2c303 jos jo haluttu versio - ei commit
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 24s
POC GitOps E2E / e2e (push) Failing after 49s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m44s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m48s
CI Feature / Report Summary (push) Successful in 7s
2026-06-22 05:43:00 +03:00
moilanik ec22d49039 monorepossa komponetti parametrina
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
POC GitOps E2E / e2e (push) Successful in 52s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m29s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m40s
CI Feature / Report Summary (push) Successful in 6s
2026-06-22 05:33:11 +03:00
moilanik 13493de7b2 git username & email
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 22s
POC GitOps E2E / e2e (push) Successful in 53s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m35s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m35s
CI Feature / Report Summary (push) Successful in 6s
2026-06-22 05:09:13 +03:00
moilanik 47df5a8017 poc
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 23s
unit-tests Bats test report
CI Feature / Bats tests (push) Failing after 1m34s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m35s
CI Feature / Report Summary (push) Successful in 5s
POC GitOps E2E / e2e (push) Failing after 35s
2026-06-22 04:55:09 +03:00
moilanik e84e37c9f8 poc
POC GitOps Dispatch / orchestrator (push) Successful in 10s
POC GitOps Dispatch / test (push) Has been skipped
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 31s
unit-tests Bats test report
acc-tests Cucumber test report
CI Feature / Bats tests (push) Successful in 1m33s
CI Feature / Cucumber tests (push) Successful in 1m35s
CI Feature / Report Summary (push) Successful in 4s
2026-06-22 04:25:05 +03:00
moilanik 9105675591 poc
POC GitOps Dispatch / echo (push) Successful in 13s
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 33s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m34s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m48s
CI Feature / Report Summary (push) Successful in 5s
2026-06-22 04:17:07 +03:00
moilanik 1385afcca6 teet
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 31s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m34s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Successful in 1m47s
CI Feature / Report Summary (push) Successful in 6s
2026-06-21 17:14:27 +03:00
moilanik 5c9df73a66 cucumber testejä lisää
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 34s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 45s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m36s
CI Feature / Report Summary (push) Successful in 5s
2026-06-21 16:10:41 +03:00
moilanik 86e73d87d3 gitops init
CI Feature / Load example-gitea-env.conf to pipeline env (push) Successful in 24s
acc-tests Cucumber test report
CI Feature / Cucumber tests (push) Failing after 1m10s
unit-tests Bats test report
CI Feature / Bats tests (push) Successful in 1m35s
CI Feature / Report Summary (push) Successful in 6s
2026-06-21 15:44:31 +03:00
5 changed files with 32 additions and 157 deletions
+16 -5
View File
@@ -3,18 +3,19 @@ on:
push:
branches:
- main
- feature/gitops
workflow_dispatch:
jobs:
load-config:
name: Config load
name: Load example-gitea-env.conf to pipeline env
uses: niko/gitea-ci-library/.gitea/workflows/config-provider.yml@main
secrets: inherit
with:
config_path: .gitea/workflows/example-gitea-env.conf
check-version:
name: Latest versio
name: Check existing artifact
needs: [load-config]
uses: niko/gitea-ci-library/.gitea/workflows/check-version.yml@main
secrets: inherit
@@ -49,9 +50,19 @@ jobs:
env_json: ${{ needs.load-config.outputs.env_json }}
version: ${{ needs.check-version.outputs.version }}
helm-build-push:
name: Build & Push Helm
needs: [load-config, check-version, bats, cucumber]
if: needs.check-version.outputs.artifact_exists != 'true'
uses: niko/gitea-ci-library/.gitea/workflows/helm-build-push.yml@main
secrets: inherit
with:
env_json: ${{ needs.load-config.outputs.env_json }}
version: ${{ needs.check-version.outputs.version }}
docker-gitops:
name: GitOps
needs: [docker-build-push, load-config, check-version]
name: Update docker
needs: [docker-build-push]
uses: niko/gitea-ci-library/.gitea/workflows/gitops-dispatch.yml@main
secrets: inherit
with:
@@ -74,7 +85,7 @@ jobs:
tag-maintenance:
name: Move provider version tag
needs: [docker-gitops]
needs: [docker-build-push, helm-build-push]
if: success()
uses: niko/gitea-ci-library/.gitea/workflows/tag-maintenance.yml@main
secrets: inherit
+6 -6
View File
@@ -10,14 +10,14 @@ on:
jobs:
load-config:
name: Config load
name: Load git-pages.gitea-env.conf to pipeline env
uses: niko/gitea-ci-library/.gitea/workflows/config-provider.yml@main
secrets: inherit
with:
config_path: .gitea/workflows/git-pages.gitea-env.conf
check-version:
name: Latest version
name: Check existing artifact
needs: [load-config]
uses: niko/gitea-ci-library/.gitea/workflows/check-version.yml@main
secrets: inherit
@@ -36,9 +36,9 @@ jobs:
chart_path: git-pages
chart-gitops:
name: GitOps
needs: [helm-push, load-config, check-version]
uses: niko/gitea-ci-library/.gitea/workflows/gitops-dispatch.yml@main
name: Update chart to the cluster
needs: [helm-push]
uses: niko/gitea-ci-library/.gitea/workflows/gitops-dispatch.yml
secrets: inherit
with:
env_json: ${{ needs.load-config.outputs.env_json }}
@@ -49,7 +49,7 @@ jobs:
report-summary:
name: Report Summary
needs: [load-config, check-version, helm-push, chart-gitops]
needs: [load-config, helm-push, chart-gitops]
if: always()
uses: niko/gitea-ci-library/.gitea/workflows/report-summary.yml@main
with:
+9 -140
View File
@@ -22,7 +22,7 @@ on:
required: true
outputs:
summary:
description: "Pipe-format: component|version|status|commit_sha|repo"
description: 'Pipe-format: component|version|status|commit_sha|repo'
value: ${{ jobs.dispatch.outputs.summary }}
env:
@@ -35,155 +35,24 @@ env:
GITEA_API_URL: ${{ fromJson(inputs.env_json).GITEA_API_URL }}
GITOPS_TAG_PREFIX: ${{ fromJson(inputs.env_json).GIT_TAG_PREFIX || '' }}
GITOPS_WORKFLOW: gitops-service.yaml
GITOPS_DISPATCH_TIMEOUT: 30
jobs:
dispatch:
runs-on: ubuntu-latest
outputs:
summary: ${{ steps.summary.outputs.GITOPS_SUMMARY }}
summary: ${{ steps.run.outputs.GITOPS_SUMMARY }}
steps:
- name: Generate dispatch_id
id: gen
run: |
ID=$(date +%s | md5sum | head -c 8)
echo "dispatch_id=$ID" >> "$GITHUB_OUTPUT"
- name: Dispatch to GitOps repo
env:
GITEA_TOKEN: ${{ secrets.GITOPS_DISPATCH_TOKEN }}
run: |
INPUTS=$(jq -nc \
--arg dispatch_id "${{ steps.gen.outputs.dispatch_id }}" \
--arg file "$GITOPS_FILE" \
--arg yq_tpl "$GITOPS_YQ_TPL" \
--arg version "$GITOPS_VERSION" \
--arg source_repo "$GITOPS_SOURCE_REPO" \
--arg source_commit "$GITOPS_SOURCE_COMMIT" \
--arg git_tag_prefix "${GITOPS_TAG_PREFIX:-}" \
'{dispatch_id: $dispatch_id, file: $file, yq_tpl: $yq_tpl, version: $version, source_repo: $source_repo, source_commit: $source_commit, git_tag_prefix: $git_tag_prefix}')
curl -s -X POST \
"${GITEA_API_URL}/api/v1/repos/${GITOPS_REPO}/actions/workflows/${GITOPS_WORKFLOW}/dispatches" \
-H "Authorization: token $GITEA_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -nc --arg ref "main" --argjson inputs "$INPUTS" '{ref: "main", inputs: $inputs}')"
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: niko/gitea-ci-library
path: .ci
- name: Poll for completion
id: poll
- name: Run gitops dispatch
id: run
env:
GITEA_TOKEN: ${{ secrets.GITOPS_DISPATCH_TOKEN }}
run: |
ID="${{ steps.gen.outputs.dispatch_id }}"
TIMEOUT_MINUTES="${GITOPS_DISPATCH_TIMEOUT:-30}"
POLL_INTERVAL=10
START_TIME=$(date +%s)
TIMEOUT_SECONDS=$((TIMEOUT_MINUTES * 60))
echo "Polling for run with dispatch_id=$ID"
while [ -z "$RUN_ID" ]; do
NOW=$(date +%s)
ELAPSED=$((NOW - START_TIME))
if [ "$ELAPSED" -ge "$TIMEOUT_SECONDS" ]; then
echo "ERROR: Timeout waiting for run to appear" >&2
exit 124
fi
RUNS_RESP=$(curl -s --connect-timeout 5 --max-time 10 \
"${GITEA_API_URL}/api/v1/repos/${GITOPS_REPO}/actions/runs?event=workflow_dispatch&limit=10" \
-H "Authorization: token $GITEA_TOKEN")
RUN_ID=$(echo "$RUNS_RESP" | jq -r --arg id "$ID" \
'[.workflow_runs[] | select(.display_title | contains($id))] | .[0].id // empty')
[ -z "$RUN_ID" ] && sleep "$POLL_INTERVAL"
done
echo "Run found: id=$RUN_ID"
while true; do
NOW=$(date +%s)
ELAPSED=$((NOW - START_TIME))
if [ "$ELAPSED" -ge "$TIMEOUT_SECONDS" ]; then
echo "ERROR: Timeout waiting for completion" >&2
exit 124
fi
RUN_RESP=$(curl -s --connect-timeout 5 --max-time 10 \
"${GITEA_API_URL}/api/v1/repos/${GITOPS_REPO}/actions/runs/${RUN_ID}" \
-H "Authorization: token $GITEA_TOKEN")
STATUS=$(echo "$RUN_RESP" | jq -r '.status // "running"')
CONCLUSION=$(echo "$RUN_RESP" | jq -r '.conclusion // ""')
echo " status=$STATUS conclusion=$CONCLUSION"
if [ "$STATUS" = "completed" ]; then
if [ "$CONCLUSION" = "success" ]; then
echo "GitOps workflow completed successfully"
# 1. List recent commits from GitOps repo
COMMITS=$(curl -s --connect-timeout 5 --max-time 10 \
"${GITEA_API_URL}/api/v1/repos/${GITOPS_REPO}/commits?sha=main&limit=10" \
-H "Authorization: token $GITEA_TOKEN")
# 2. Find commit by message: "gitops: update version to X.Y.Z"
SEARCH_MSG="gitops: update version to ${GITOPS_VERSION}"
GITOPS_COMMIT=$(echo "$COMMITS" | jq -r \
--arg msg "$SEARCH_MSG" \
'[.[] | select(.commit.message | contains($msg))] | .[0].sha // empty')
# 3. If not found → fail
if [ -z "$GITOPS_COMMIT" ]; then
echo "ERROR: no matching GitOps commit found for version ${GITOPS_VERSION}" >&2
exit 1
fi
echo "GITOPS_COMMIT=$GITOPS_COMMIT" >> "$GITHUB_OUTPUT"
echo "$GITOPS_COMMIT" > /tmp/gitops-commit
exit 0
else
echo "ERROR: GitOps workflow failed with conclusion=$CONCLUSION" >&2
exit 1
fi
fi
sleep "$POLL_INTERVAL"
done
- name: GitOps summary
id: summary
if: always()
run: |
STATUS="failure"
GITOPS_SHA=""
if [ -f /tmp/gitops-commit ]; then
STATUS="success"
GITOPS_SHA=$(cat /tmp/gitops-commit)
fi
COMPONENT="${GITOPS_TAG_PREFIX:-${GITOPS_FILE}}"
echo "GITOPS_SUMMARY=${COMPONENT}|${GITOPS_VERSION}|${STATUS}|${GITOPS_SHA}|${GITOPS_REPO}" >> "$GITHUB_OUTPUT"
- name: Set commit status
if: success()
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GITOPS_SHA=$(cat /tmp/gitops-commit)
PREFIX="${GITOPS_TAG_PREFIX%/}"
if [ -n "$PREFIX" ]; then
CONTEXT="gitops/$(basename "${GITOPS_SOURCE_REPO}")/${PREFIX}"
DESCRIPTION="GitOps: ${PREFIX} ${GITOPS_VERSION}"
else
CONTEXT="gitops/$(basename "${GITOPS_SOURCE_REPO}")"
DESCRIPTION="GitOps: ${GITOPS_VERSION}"
fi
ROOT_REPO="${GITOPS_SOURCE_REPO}" ROOT_COMMIT="${GITOPS_SOURCE_COMMIT}" \
bash .ci/scripts/report-status.sh success \
"$DESCRIPTION" "$CONTEXT" "" \
"${GITEA_API_URL}/${GITOPS_REPO}/commit/${GITOPS_SHA}"
OUTPUT=$(bash .ci/scripts/gitops-dispatch.sh)
echo "$OUTPUT"
SUMMARY=$(awk -F= '/^GITOPS_SUMMARY=/ {print $2}' <<<"$OUTPUT")
echo "GITOPS_SUMMARY=$SUMMARY" >> "$GITHUB_OUTPUT"
+1 -1
View File
@@ -122,7 +122,7 @@ helm upgrade --install git-pages ./git-pages \
helm template git-pages ./git-pages -f "$VALUES"
```
---
## CI-julkaisu
-5
View File
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
echo "gitops-dispatch: validating env vars..."
: "${GITOPS_FILE:?}"
: "${GITOPS_YQ_TPL:?}"
: "${GITOPS_VERSION:?}"
@@ -14,7 +13,6 @@ echo "gitops-dispatch: validating env vars..."
TIMEOUT="${GITOPS_DISPATCH_TIMEOUT:-30}"
echo "gitops-dispatch: constructing inputs..."
INPUTS=$(jq -nc \
--arg file "$GITOPS_FILE" \
--arg yq_tpl "$GITOPS_YQ_TPL" \
@@ -25,7 +23,6 @@ INPUTS=$(jq -nc \
'{file: $file, yq_tpl: $yq_tpl, version: $version, source_repo: $source_repo, source_commit: $source_commit, git_tag_prefix: $git_tag_prefix}')
DIR="$(cd "$(dirname "$0")" && pwd)"
echo "gitops-dispatch: dispatching to $GITOPS_REPO/$GITOPS_WORKFLOW..."
set +e
OUTPUT=$(bash "$DIR/dispatch-workflow.sh" \
"$GITOPS_REPO" "$GITOPS_WORKFLOW" "main" \
@@ -33,9 +30,7 @@ OUTPUT=$(bash "$DIR/dispatch-workflow.sh" \
EXIT=$?
set -e
echo "=== DISPATCH OUTPUT (exit=$EXIT) ==="
echo "$OUTPUT"
echo "=== END DISPATCH ==="
STATUS="failure"
GITOPS_SHA=""