Skip to content
This repository was archived by the owner on May 13, 2025. It is now read-only.

Commit ae2c53b

Browse files
fix helm project-operator CI
ammend build CI to not use dapper Signed-off-by: Alexandre Lamarre <[email protected]>
1 parent e84c013 commit ae2c53b

File tree

7 files changed

+61
-19
lines changed

7 files changed

+61
-19
lines changed

.github/workflows/e2e-ci.yaml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ on:
2828
env:
2929
GOARCH: amd64
3030
CGO_ENABLED: 0
31-
SETUP_GO_VERSION: '^1.18'
31+
SETUP_GO_VERSION: '^1.22'
3232
YQ_VERSION: v4.25.1
3333
E2E_CI: true
3434
REPO: rancher
3535
TAG: dev
3636
APISERVER_PORT: 8001
37-
DEFAULT_SLEEP_TIMEOUT_SECONDS: 10
37+
DEFAULT_SLEEP_TIMEOUT_SECONDS: 60
3838
KUBECTL_WAIT_TIMEOUT: 120s
3939
DEBUG: ${{ github.event.inputs.debug || false }}
4040

@@ -48,7 +48,7 @@ jobs:
4848
matrix:
4949
k3s_version:
5050
# k3d version list k3s | sed 's/+/-/' | sort -h
51-
- ${{ github.event.inputs.k3s_version || 'v1.20.15-k3s1' }}
51+
- ${{ github.event.inputs.k3s_version || 'v1.27.7-k3s2' }}
5252
steps:
5353
-
5454
uses: actions/checkout@v3
@@ -58,6 +58,11 @@ jobs:
5858
name: Install mikefarah/yq
5959
run: |
6060
sudo wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64 -O /usr/bin/yq && sudo chmod +x /usr/bin/yq;
61+
-
62+
name: setup Go
63+
uses: actions/setup-go@v5
64+
with:
65+
go-version: '1.22'
6166
-
6267
name: Perform CI
6368
run: |
@@ -94,6 +99,12 @@ jobs:
9499
-
95100
name: Check if Helm Project Operator is up
96101
run: ./.github/workflows/e2e/scripts/validate-helm-project-operator.sh;
102+
-
103+
name: Install rancher manager
104+
run: ./.github/workflows/e2e/scripts/install-rancher.sh;
105+
-
106+
name: Validate rancher manager
107+
run: ./.github/workflows/e2e/scripts/validate-rancher.sh;
97108
-
98109
name: Check if Project Registration Namespace is auto-created on namespace detection
99110
run: ./.github/workflows/e2e/scripts/create-project-namespace.sh;

.github/workflows/e2e/scripts/create-project-namespace.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ source $(dirname $0)/entry
66
cd $(dirname $0)/../../../..
77

88
kubectl create namespace e2e-hpo || true
9-
kubectl label namespace e2e-hpo field.cattle.io/projectId=p-example --overwrite
9+
kubectl annotate namespace e2e-hpo field.cattle.io/projectId=local:p-example --overwrite
1010
sleep "${DEFAULT_SLEEP_TIMEOUT_SECONDS}"
1111
if ! kubectl get namespace cattle-project-p-example; then
12+
echo "DEBUG"
13+
kubectl get ns
1214
echo "ERROR: Expected cattle-project-p-example namespace to exist after ${DEFAULT_SLEEP_TIMEOUT_SECONDS} seconds, not found"
1315
exit 1
1416
fi
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
set -e
3+
4+
helm repo add rancher-stable https://releases.rancher.com/server-charts/stable
5+
6+
helm repo update
7+
8+
kubectl create namespace cattle-system
9+
10+
helm install -n cattle-system rancher rancher-stable/rancher
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
set -e
3+
4+
sleep "${DEFAULT_SLEEP_TIMEOUT_SECONDS}"
5+
# Check deployment status
6+
kubectl -n cattle-system rollout status deploy/rancher
7+
8+
# Capture the exit status of the previous command
9+
exit_status=$?
10+
11+
if [ $exit_status -eq 0 ]; then
12+
echo "rancher deployment is healthy."
13+
else
14+
echo "rancher deployment is not healthy."
15+
fi
16+
17+
exit $exit_status

.github/workflows/pull-request.yaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,17 @@ on: [pull_request]
55
jobs:
66
build:
77
runs-on: ubuntu-latest
8-
container:
9-
image: rancher/dapper:v0.5.4
108
steps:
11-
- uses: actions/checkout@v1
12-
- name: Run CI
13-
run: dapper ci
9+
-
10+
name : setup go
11+
uses: actions/setup-go@v5
12+
with:
13+
go-version: '1.22'
14+
-
15+
name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
-
18+
uses: actions/checkout@v1
19+
-
20+
name: Run CI
21+
run: make ci

Makefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
11
TARGETS := $(shell ls scripts)
22

3-
.dapper:
4-
@echo Downloading dapper
5-
@curl -sL https://releases.rancher.com/dapper/latest/dapper-$$(uname -s)-$$(uname -m) > .dapper.tmp
6-
@@chmod +x .dapper.tmp
7-
@./.dapper.tmp -v
8-
@mv .dapper.tmp .dapper
9-
10-
$(TARGETS): .dapper
11-
./.dapper $@
3+
$(TARGETS):
4+
./scripts/$@
125

136
.DEFAULT_GOAL := default
147

15-
.PHONY: $(TARGETS)
8+
.PHONY: $(TARGETS)

pkg/generated/controllers/helm.cattle.io/v1alpha1/projecthelmchart.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)