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

Commit

Permalink
feat: reduce git-operator down to only REST API (#50)
Browse files Browse the repository at this point in the history
* reduce git-operator down to only REST API

* fix: test

* style: fix linting errors

* chore: bump go version

* fix: logr dependencies
  • Loading branch information
moshloop authored Dec 13, 2021
1 parent e61b1fe commit 165f418
Show file tree
Hide file tree
Showing 41 changed files with 178 additions and 4,091 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- master
pull_request:
paths:
- '**.go'
- "**.go"
jobs:
golangci:
name: lint
Expand All @@ -19,7 +19,8 @@ jobs:
version: v1.36
- name: Check auto-generated files
run: |
which controller-gen && rm $(which controller-gen)
make resources
git diff
changed_files=$(git status -s)
[[ -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)
[[ -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)
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
test:
strategy:
matrix:
go-version: [1.14.x]
go-version: [1.17.x]
platform: [ubuntu-latest]
k8s:
- v1.20.7
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.13 as builder
FROM golang:1.17 as builder

WORKDIR /workspace
# Copy the Go Modules manifests
Expand Down
11 changes: 2 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,7 @@ docker-push:
# download controller-gen if necessary
controller-gen:
ifeq (, $(shell which controller-gen))
@{ \
set -e ;\
CONTROLLER_GEN_TMP_DIR=$$(mktemp -d) ;\
cd $$CONTROLLER_GEN_TMP_DIR ;\
go mod init tmp ;\
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.0 ;\
rm -rf $$CONTROLLER_GEN_TMP_DIR ;\
}
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.6.0
CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
Expand All @@ -106,4 +99,4 @@ endif

# Generate all the resources and formats your code, i.e: CRDs, controller-gen, static
.PHONY: resources
resources: static fmt vet
resources: static fmt vet
58 changes: 0 additions & 58 deletions api/v1/gitbranch_types.go

This file was deleted.

67 changes: 0 additions & 67 deletions api/v1/gitdeployment_types.go

This file was deleted.

82 changes: 0 additions & 82 deletions api/v1/gitops_types.go

This file was deleted.

88 changes: 0 additions & 88 deletions api/v1/gitpullrequest_types.go

This file was deleted.

Loading

0 comments on commit 165f418

Please sign in to comment.