File tree Expand file tree Collapse file tree 11 files changed +88
-50
lines changed Expand file tree Collapse file tree 11 files changed +88
-50
lines changed Original file line number Diff line number Diff line change 1+ name : main
2+
3+ on :
4+ push :
5+ branches :
6+ - master
7+
8+ jobs :
9+ build :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - name : Checkout
13+ uses : actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3
14+ - name : Setup Go
15+ uses : actions/setup-go@4d34df0c2316fe8122ab82dc22947d607c0c91f9 # v4.0.0
16+ with :
17+ go-version : 1.20.x
18+ - name : Restore Go cache
19+ uses : actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
20+ with :
21+ path : ~/go/pkg/mod
22+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
23+ restore-keys : |
24+ ${{ runner.os }}-go-
25+ - name : Tests
26+ run : make test
27+ - name : Send go coverage report
28+ uses : shogo82148/actions-goveralls@31ee804b8576ae49f6dc3caa22591bc5080e7920 # v1.6.0
29+ with :
30+ path-to-profile : coverage.out
Original file line number Diff line number Diff line change @@ -47,17 +47,15 @@ jobs:
4747 fi
4848 - name : Build container image
4949 run : |
50- make docker-build IMG=test/k8soauth2-proxy-controller:latest BUILD_PLATFORMS=linux/amd64 \
51- BUILD_ARGS="--cache-from=type=local,src=/tmp/.buildx-cache \
52- --cache-to=type=local,dest=/tmp/.buildx-cache-new,mode=max"
50+ make docker-build
5351 - name : Setup Kubernetes
5452 uses : engineerd/setup-kind@aa272fe2a7309878ffc2a81c56cfe3ef108ae7d0 # v0.5.0
5553 with :
5654 version : v0.17.0
5755 - name : Load test image
58- run : kind load docker-image test/ k8soauth2-proxy-controller:latest
56+ run : kind load docker-image k8soauth2-proxy-controller:latest
5957 - name : Deploy controller
60- run : make deploy IMG=test/k8soauth2-proxy-controller:latest
58+ run : make deploy
6159 - name : Debug failure
6260 if : failure()
6361 run : |
Original file line number Diff line number Diff line change 1- name : Lint and Test Charts
1+ name : pr-chart
22
33on : pull_request
44
Original file line number Diff line number Diff line change 1- name : Release Chart
1+ name : release-chart
22
33on :
44 push :
Original file line number Diff line number Diff line change 1+ name : scan
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+ schedule :
9+ - cron : ' 18 10 * * 3'
10+
11+ permissions :
12+ contents : read # for actions/checkout to fetch code
13+ security-events : write # for codeQL to write security events
14+
15+ jobs :
16+ fossa :
17+ name : FOSSA
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
21+ - name : Run FOSSA scan and upload build data
22+ uses : fossa-contrib/fossa-action@6728dc6fe9a068c648d080c33829ffbe56565023 # v2.0.0
23+ with :
24+ # FOSSA Push-Only API Token
25+ fossa-api-key : 956b9b92c5b16eeca1467cebe104f2c3
26+ github-token : ${{ github.token }}
27+
28+ codeql :
29+ name : CodeQL
30+ runs-on : ubuntu-latest
31+ steps :
32+ - name : Checkout repository
33+ uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
34+ - name : Initialize CodeQL
35+ uses : github/codeql-action/init@dc046388f30eacf938aadd32064285f437bd9c04 # codeql-bundle-20221020
36+ with :
37+ languages : go
38+ - name : Autobuild
39+ uses : github/codeql-action/autobuild@dc046388f30eacf938aadd32064285f437bd9c04 # codeql-bundle-20221020
40+ - name : Perform CodeQL Analysis
41+ uses : github/codeql-action/analyze@dc046388f30eacf938aadd32064285f437bd9c04 # codeql-bundle-20221020
Original file line number Diff line number Diff line change 66* .so
77* .dylib
88bin
9+ manager
910
1011# Test binary, build with `go test -c`
1112* .test
Original file line number Diff line number Diff line change 3333dockers :
3434- image_templates :
3535 - ghcr.io/doodlescheduling/{{ .ProjectName }}:v{{ .Version }}-amd64
36- dockerfile : Dockerfile.release
36+ dockerfile : Dockerfile
3737 use : buildx
3838 ids :
3939 - manager
@@ -50,7 +50,7 @@ dockers:
5050- image_templates :
5151 - ghcr.io/doodlescheduling/{{ .ProjectName }}:v{{ .Version }}-arm64v8
5252 goarch : arm64
53- dockerfile : Dockerfile.release
53+ dockerfile : Dockerfile
5454 use : buildx
5555 ids :
5656 - manager
Original file line number Diff line number Diff line change 22
33### Controller release
441 . Merge all pr's to master which need to be part of the new release
5- 2 . Create pr to master with these changes:
6- 1 . Bump kustomization
7- 2 . Create CHANGELOG.md entry with release and date
8- 3 . Merge pr
9- 4 . Push a tag following semantic versioning prefixed by 'v'. Do not create a github release, this is done automatically.
10- 5 . Create new branch and add the following changes:
5+ 2 . Create pr to master and bump the kustomization base
6+ 3 . Push a tag following semantic versioning prefixed by 'v'. Do not create a github release, this is done automatically.
7+ 4 . Create a new pr and add the following changes:
118 1 . Bump chart version
129 2 . Bump charts app version
13- 6 . Create pr to master and merge
1410
1511### Helm chart change only
16- 1 . Create branch with changes
17- 2 . Bump chart version
18- 3 . Create pr to master and merge
12+ 1 . Bump the helm chart version in the pr
Original file line number Diff line number Diff line change 1- # Build the manager binary
2- FROM golang:1.20 as builder
3-
4- WORKDIR /workspace
5- COPY . .
6-
7- # cache deps before building and copying source so that we don't need to re-download as much
8- # and so that source changes don't invalidate our downloaded layer
9- RUN go mod download
10-
11- # Build
12- RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
13-
14- # Use distroless as minimal base image to package the manager binary
15- # Refer to https://github.com/GoogleContainerTools/distroless for more details
161FROM gcr.io/distroless/static:nonroot
172WORKDIR /
18- COPY --from=builder /workspace/ manager .
19- USER nonroot:nonroot
3+ COPY manager manager
4+ USER 65532:65532
205
216# User env is required by opentelemetry-go
227ENV USER=k8soauth2-proxy-controller
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments