Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add autoupdate/moonray to GitHub workflows #467

Merged
merged 4 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
bschimke95 marked this conversation as resolved.
Show resolved Hide resolved

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"
Loading