Skip to content
This repository was archived by the owner on Jun 14, 2023. It is now read-only.

Commit 165f418

Browse files
authored
feat: reduce git-operator down to only REST API (#50)
* reduce git-operator down to only REST API * fix: test * style: fix linting errors * chore: bump go version * fix: logr dependencies
1 parent e61b1fe commit 165f418

41 files changed

Lines changed: 178 additions & 4091 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- master
66
pull_request:
77
paths:
8-
- '**.go'
8+
- "**.go"
99
jobs:
1010
golangci:
1111
name: lint
@@ -19,7 +19,8 @@ jobs:
1919
version: v1.36
2020
- name: Check auto-generated files
2121
run: |
22+
which controller-gen && rm $(which controller-gen)
2223
make resources
2324
git diff
2425
changed_files=$(git status -s)
25-
[[ -z "$changed_files" ]] || (printf "Change is detected in some files: \n$changed_files\n Did you run 'make resources' before sending the PR?" && exit 1)
26+
[[ -z "$changed_files" ]] || (printf "Change is detected in some files: \n$changed_files\n Did you run 'make resources' before sending the PR?" && exit 1)

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ jobs:
44
test:
55
strategy:
66
matrix:
7-
go-version: [1.14.x]
7+
go-version: [1.17.x]
88
platform: [ubuntu-latest]
99
k8s:
1010
- v1.20.7

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.13 as builder
2+
FROM golang:1.17 as builder
33

44
WORKDIR /workspace
55
# Copy the Go Modules manifests

Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,7 @@ docker-push:
7474
# download controller-gen if necessary
7575
controller-gen:
7676
ifeq (, $(shell which controller-gen))
77-
@{ \
78-
set -e ;\
79-
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
80-
cd $$CONTROLLER_GEN_TMP_DIR ;\
81-
go mod init tmp ;\
82-
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 ;\
83-
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
84-
}
77+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.0
8578
CONTROLLER_GEN=$(GOBIN)/controller-gen
8679
else
8780
CONTROLLER_GEN=$(shell which controller-gen)
@@ -106,4 +99,4 @@ endif
10699

107100
# Generate all the resources and formats your code, i.e: CRDs, controller-gen, static
108101
.PHONY: resources
109-
resources: static fmt vet
102+
resources: static fmt vet

api/v1/gitbranch_types.go

Lines changed: 0 additions & 58 deletions
This file was deleted.

api/v1/gitdeployment_types.go

Lines changed: 0 additions & 67 deletions
This file was deleted.

api/v1/gitops_types.go

Lines changed: 0 additions & 82 deletions
This file was deleted.

api/v1/gitpullrequest_types.go

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)