From 6501434862850fbafe25b5b10a132343500a03eb Mon Sep 17 00:00:00 2001 From: I538344 Date: Wed, 27 Aug 2025 14:57:29 +0200 Subject: [PATCH 1/5] feat: [DevOps] Orchestration spec update automation --- .github/workflows/weekly-spec-update.yaml | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/weekly-spec-update.yaml b/.github/workflows/weekly-spec-update.yaml index 6ee440267..a06aed4aa 100644 --- a/.github/workflows/weekly-spec-update.yaml +++ b/.github/workflows/weekly-spec-update.yaml @@ -3,13 +3,13 @@ name: "Weekly Spec Update" on: schedule: - cron: '0 0 * * SUN' # Every Sunday at midnight UTC + workflow_dispatch: jobs: update-all-specs: runs-on: ubuntu-latest permissions: - contents: write - pull-requests: write + actions: write strategy: matrix: @@ -17,13 +17,30 @@ jobs: - core - document-grounding - prompt-registry + - orchestration steps: - name: "Checkout repository" uses: actions/checkout@v4 + - name: "Get orchestration version" + run: | + ORCH_VERSION=$(curl --silent --request GET --url "https://github.tools.sap/api/v3/repos/MLF-prod/mlf-gitops-prod/contents/services/llm-orchestration/source/Chart.yaml?ref=aws.eu-central-1.prod-eu/current" -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github.v3.raw" | grep 'version:' | awk '{print $2}') + + echo "Orchestration version: $ORCH_VERSION" + echo "ORCH_VERSION=$ORCH_VERSION" >> $GITHUB_ENV + env: + TOKEN: ${{ secrets.GH_TOOLS_TOKEN }} + + - name: "Trigger spec update" run: | + FILE_REF="main" + if [ "${{ matrix.file }}" = "orchestration" ]; then + FILE_REF="$ORCH_VERSION" + fi + echo "Using file ref: $FILE_REF" + gh workflow run spec-update.yaml \ --field file=${{ matrix.file }} \ --field file-ref=main \ From 2a45cd272a09cbffe6d7419ebaaac13fb9f25308 Mon Sep 17 00:00:00 2001 From: I538344 Date: Wed, 27 Aug 2025 15:01:48 +0200 Subject: [PATCH 2/5] fix branch name --- .github/workflows/weekly-spec-update.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/weekly-spec-update.yaml b/.github/workflows/weekly-spec-update.yaml index a06aed4aa..540091b39 100644 --- a/.github/workflows/weekly-spec-update.yaml +++ b/.github/workflows/weekly-spec-update.yaml @@ -24,6 +24,7 @@ jobs: uses: actions/checkout@v4 - name: "Get orchestration version" + if: matrix.file == 'orchestration' run: | ORCH_VERSION=$(curl --silent --request GET --url "https://github.tools.sap/api/v3/repos/MLF-prod/mlf-gitops-prod/contents/services/llm-orchestration/source/Chart.yaml?ref=aws.eu-central-1.prod-eu/current" -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github.v3.raw" | grep 'version:' | awk '{print $2}') @@ -35,15 +36,15 @@ jobs: - name: "Trigger spec update" run: | - FILE_REF="main" + BRANCH="main" if [ "${{ matrix.file }}" = "orchestration" ]; then - FILE_REF="$ORCH_VERSION" + BRANCH="v$ORCH_VERSION" fi - echo "Using file ref: $FILE_REF" + echo "Using branch: $BRANCH" gh workflow run spec-update.yaml \ --field file=${{ matrix.file }} \ - --field file-ref=main \ + --field file-ref=$BRANCH \ --field create-pr=true env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 47a35bf570f9b067eecb5b07aa448e8ce3c03924 Mon Sep 17 00:00:00 2001 From: I538344 Date: Wed, 27 Aug 2025 15:24:04 +0200 Subject: [PATCH 3/5] finito --- .github/workflows/weekly-spec-update.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/weekly-spec-update.yaml b/.github/workflows/weekly-spec-update.yaml index 540091b39..b7e6c653b 100644 --- a/.github/workflows/weekly-spec-update.yaml +++ b/.github/workflows/weekly-spec-update.yaml @@ -28,6 +28,10 @@ jobs: run: | ORCH_VERSION=$(curl --silent --request GET --url "https://github.tools.sap/api/v3/repos/MLF-prod/mlf-gitops-prod/contents/services/llm-orchestration/source/Chart.yaml?ref=aws.eu-central-1.prod-eu/current" -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github.v3.raw" | grep 'version:' | awk '{print $2}') + if [ -z "$ORCH_VERSION" ]; then + echo "Failed to fetch orchestration version" + exit 1 + fi echo "Orchestration version: $ORCH_VERSION" echo "ORCH_VERSION=$ORCH_VERSION" >> $GITHUB_ENV env: @@ -48,3 +52,16 @@ jobs: --field create-pr=true env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: "Slack Notification" + if: failure() + uses: slackapi/slack-github-action@v2.1.1 + with: + webhook: ${{ secrets.SLACK_WEBHOOK }} + webhook-type: incoming-webhook + payload: | + blocks: + - type: "section" + text: + type: "mrkdwn" + text: "⚠️ Weekly spec update failed! 😬 Please inspect & fix by clicking " From 2ae2a876a8a2268be4fd6125959c60f3f0793229 Mon Sep 17 00:00:00 2001 From: I538344 Date: Wed, 27 Aug 2025 15:29:21 +0200 Subject: [PATCH 4/5] fix tag name --- .github/workflows/weekly-spec-update.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/weekly-spec-update.yaml b/.github/workflows/weekly-spec-update.yaml index b7e6c653b..638a000e9 100644 --- a/.github/workflows/weekly-spec-update.yaml +++ b/.github/workflows/weekly-spec-update.yaml @@ -42,7 +42,7 @@ jobs: run: | BRANCH="main" if [ "${{ matrix.file }}" = "orchestration" ]; then - BRANCH="v$ORCH_VERSION" + BRANCH="rel/$ORCH_VERSION" fi echo "Using branch: $BRANCH" From 6fc321176febc02f2075044cee5660e4eb1db25a Mon Sep 17 00:00:00 2001 From: I538344 Date: Wed, 27 Aug 2025 15:37:25 +0200 Subject: [PATCH 5/5] remove workflow dispatch --- .github/workflows/weekly-spec-update.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/weekly-spec-update.yaml b/.github/workflows/weekly-spec-update.yaml index 638a000e9..73f82cd3a 100644 --- a/.github/workflows/weekly-spec-update.yaml +++ b/.github/workflows/weekly-spec-update.yaml @@ -3,7 +3,6 @@ name: "Weekly Spec Update" on: schedule: - cron: '0 0 * * SUN' # Every Sunday at midnight UTC - workflow_dispatch: jobs: update-all-specs: