Skip to content

Commit

Permalink
Add autoupdate/moonray to GitHub workflows (#467)
Browse files Browse the repository at this point in the history
  • Loading branch information
bschimke95 committed Jun 5, 2024
1 parent f0bed04 commit 7a82439
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ on:
branches:
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
pull_request:

permissions:
contents: read
contents: read

jobs:
test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/moonray.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Auto-update moonray branch

on:
push:
branches:
- main

permissions:
contents: read

jobs:
update:
permissions:
contents: write # for Git to git push
runs-on: ubuntu-22.04
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
with:
egress-policy: audit
- name: Sync ${{ github.ref }} to autoupdate/moonray
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.DEPLOY_KEY_TO_UPDATE_STRICT_BRANCH }}
- name: Apply moonray patch
run: |
git checkout -b autoupdate/moonray
./build-scripts/patches/moonray/apply
- name: Push to autoupdate/moonray
run: |
git push origin --force autoupdate/moonray
1 change: 1 addition & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sbom.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- autoupdate/strict
- autoupdate/moonray
- 'release-[0-9]+.[0-9]+'
- 'autoupdate/release-[0-9]+.[0-9]+-strict'
- 'autoupdate/sync/**'
Expand Down
24 changes: 24 additions & 0 deletions build-scripts/patches/moonray/0001-Moonray.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
From de526e476d051fbc5ec4cfbec383a60729434159 Mon Sep 17 00:00:00 2001
From: Benjamin Schimke <[email protected]>
Date: Wed, 5 Jun 2024 09:48:57 +0200
Subject: [PATCH] Moonray

---
src/k8s/pkg/k8sd/features/implementation_default.go | 1 +
1 file changed, 1 insertion(+)

diff --git a/src/k8s/pkg/k8sd/features/implementation_default.go b/src/k8s/pkg/k8sd/features/implementation_default.go
index aac2d97..313a7f5 100644
--- a/src/k8s/pkg/k8sd/features/implementation_default.go
+++ b/src/k8s/pkg/k8sd/features/implementation_default.go
@@ -12,6 +12,7 @@ import (
// CoreDNS is used for DNS.
// MetricsServer is used for metrics-server.
// LocalPV Rawfile CSI is used for local-storage.
+// TODO: Replace with moonray specific implementation.
var Implementation Interface = &implementation{
applyDNS: coredns.ApplyDNS,
applyNetwork: cilium.ApplyNetwork,
--
2.34.1

14 changes: 14 additions & 0 deletions build-scripts/patches/moonray/apply
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash -xe

DIR="$(realpath "$(dirname "${0}")")"

# Configure git author
git config user.email [email protected]
git config user.name k8s-bot

# Remove unrelated tests
rm "${DIR}/../../../tests/integration/tests/test_cilium_e2e.py"
git commit -a -m "Remove unrelated tests"

# Apply strict patch
git am "${DIR}/0001-Moonray.patch"

0 comments on commit 7a82439

Please sign in to comment.