-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: upgrade default kubernetes version to 1.23.10 (#65)
* refactor: upgrade kubernetes version to v1.23.10 * chore: upgrade golang to 1.17 * perf: supported by the cluster to 1.19-1.25 * perf: use dockerfile build
- Loading branch information
Showing
11 changed files
with
1,178 additions
and
442 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Go | ||
name: pr-ci-build | ||
|
||
# Triggers the workflow on push or pull request events | ||
on: [push, pull_request] | ||
|
@@ -8,17 +8,15 @@ jobs: | |
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
- name: Setup Go environment | ||
uses: actions/[email protected] | ||
with: | ||
# The Go version to download (if necessary) and use. Supports semver spec and ranges. | ||
go-version: 1.17 | ||
|
||
- name: Install lint | ||
run: go get -u golang.org/x/lint/golint | ||
|
||
- name: Lint | ||
run: go list ./... | grep -v /vendor/ | xargs -L1 golint -set_exit_status | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
- name: Build and push | ||
id: docker_build | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: false | ||
tags: rainbond/cloud-adaptor:main-dev |
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,18 @@ | ||
FROM rainbond/golang-gcc-buildstack:1.17-alpine3.16 as builder | ||
ENV CGO_ENABLED=1 | ||
ENV GOPATH=/go | ||
ADD . /go/src/goodrain.com/cloud-adaptor/ | ||
WORKDIR /go/src/goodrain.com/cloud-adaptor/ | ||
#ENV GOPROXY=https://goproxy.cn | ||
RUN go build -ldflags "-w -s -linkmode external -extldflags '-static'" -o cloudadaptor ./cmd/cloud-adaptor | ||
|
||
FROM goodrainapps/alpine:3.16 | ||
WORKDIR /run | ||
ARG RELEASE_DESC | ||
|
||
RUN mkdir -p /app && wget "https://pkg.goodrain.com/pkg/helm" && chmod +x helm && mv helm /app/helm | ||
COPY --from=builder /go/src/goodrain.com/cloud-adaptor/cloudadaptor /run/cloudadaptor | ||
COPY ./chart /app/chart | ||
|
||
ENV RELEASE_DESC=${RELEASE_DESC} | ||
CMD ["/run/cloudadaptor", "daemon"] |
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
Oops, something went wrong.