forked from harvester/harvester
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- adjust `test` script file. - give examples for using fake clientset in unit tests.
- Loading branch information
Showing
29 changed files
with
5,521 additions
and
56 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 |
---|---|---|
|
@@ -14,6 +14,9 @@ | |
"skip-files": [ | ||
"/zz_generated_" | ||
], | ||
"skip-dirs": [ | ||
"generated" | ||
], | ||
"deadline": "5m" | ||
} | ||
} |
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,29 +1,40 @@ | ||
FROM golang:1.13.4-alpine3.10 | ||
FROM golang:1.13.15-buster | ||
RUN apt-get update -qq && apt-get install -y --no-install-recommends \ | ||
xz-utils \ | ||
unzip \ | ||
netcat \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ARG DAPPER_HOST_ARCH | ||
ENV ARCH $DAPPER_HOST_ARCH | ||
|
||
RUN apk -U add bash git gcc musl-dev docker vim less file curl wget ca-certificates | ||
RUN go get -d golang.org/x/lint/golint && \ | ||
git -C /go/src/golang.org/x/lint/golint checkout -b current 06c8688daad7faa9da5a0c2f163a3d14aac986ca && \ | ||
go install golang.org/x/lint/golint && \ | ||
rm -rf /go/src /go/pkg | ||
RUN mkdir -p /go/src/golang.org/x && \ | ||
cd /go/src/golang.org/x && git clone https://github.com/golang/tools && \ | ||
git -C /go/src/golang.org/x/tools checkout -b current aa82965741a9fecd12b026fbb3d3c6ed3231b8f8 && \ | ||
go install golang.org/x/tools/cmd/goimports | ||
RUN rm -rf /go/src /go/pkg | ||
RUN if [ "${ARCH}" == "amd64" ]; then \ | ||
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0; \ | ||
# -- for make rules | ||
## install docker client | ||
RUN apt-get update -qq && apt-get install -y --no-install-recommends \ | ||
apt-transport-https \ | ||
ca-certificates \ | ||
curl \ | ||
gnupg \ | ||
&& rm -rf /var/lib/apt/lists/*; \ | ||
\ | ||
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - >/dev/null; \ | ||
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/debian buster stable" > /etc/apt/sources.list.d/docker.list; \ | ||
\ | ||
apt-get update -qq && apt-get install -y --no-install-recommends \ | ||
docker-ce-cli=5:19.03.* \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
## install golangci | ||
RUN if [ "$(go env GOARCH)" = "amd64" ]; then \ | ||
curl -sL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b "$(go env GOPATH)/bin" v1.27.0; \ | ||
fi | ||
# -- for make rules | ||
|
||
# -- for dapper | ||
ENV GO111MODULE off | ||
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS | ||
ENV DAPPER_SOURCE /go/src/github.com/rancher/harvester/ | ||
ENV DAPPER_OUTPUT ./bin ./dist | ||
ENV DAPPER_DOCKER_SOCKET true | ||
ENV HOME ${DAPPER_SOURCE} | ||
WORKDIR ${DAPPER_SOURCE} | ||
# -- for dapper | ||
|
||
WORKDIR ${DAPPER_SOURCE} | ||
ENTRYPOINT ["./scripts/entry"] | ||
CMD ["ci"] |
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
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.