-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added github actions for the devenv operator
- Loading branch information
1 parent
a933a3c
commit 1bda74d
Showing
4 changed files
with
55 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Build Developer Environment Operator | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'devenv-operator/**' | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- 'devenv-operator/**' | ||
workflow_dispatch: | ||
defaults: | ||
run: | ||
working-directory: devenv-operator | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.22' | ||
- run: pwd | ||
- name: Build | ||
run: make build | ||
- name: Test | ||
run: go test ./... -coverprofile cover.out | ||
- name: Log in to GitHub Container Registry | ||
uses: docker/login-action@v2 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push image | ||
run: make docker-build docker-push | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Build the manager binary | ||
FROM golang:1.20 as builder | ||
FROM golang:1.22 as builder | ||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
#!/usr/bin/env bash | ||
|
||
#kind create cluster --config kind-config.yaml | ||
#sleep 10 | ||
|
||
#kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml | ||
|
||
#kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.16.2/cert-manager.yaml | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/refs/heads/main/deploy/static/provider/do/deploy.yaml | ||
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.16.2/cert-manager.yaml | ||
|
||
#kubectl patch deployment ingress-nginx-controller -n ingress-nginx --type=json -p='[{"op": "remove", "path": "/spec/template/spec/tolerations"}]' | ||
#kubectl patch deployment ingress-nginx-controller -n ingress-nginx --type=json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector"}]' | ||
# | ||
# | ||
#echo "127.0.0.1 echoserver.local" | sudo tee -a /etc/hosts | ||
# when running in KindCluster | ||
if [ -z "$1" ]; then | ||
kind create cluster --config kind-config.yaml | ||
sleep 10 | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/main/deploy/static/provider/kind/deploy.yaml | ||
kubectl patch deployment ingress-nginx-controller -n ingress-nginx --type=json -p='[{"op": "remove", "path": "/spec/template/spec/tolerations"}]' | ||
kubectl patch deployment ingress-nginx-controller -n ingress-nginx --type=json -p='[{"op": "remove", "path": "/spec/template/spec/nodeSelector"}]' | ||
else | ||
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/refs/heads/main/deploy/static/provider/do/deploy.yaml | ||
kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.16.2/cert-manager.yaml | ||
fi |