mirror of https://github.com/k3s-io/k3s
MonzElmasry
4 years ago
3 changed files with 43 additions and 0 deletions
@ -0,0 +1,11 @@
|
||||
ARG GOLANG=golang:1.16.2-alpine3.12 |
||||
FROM ${GOLANG} |
||||
|
||||
RUN apk -U --no-cache add bash jq |
||||
ENV DAPPER_SOURCE /go/src/github.com/rancher/k3s/ |
||||
ENV HOME ${DAPPER_SOURCE} |
||||
WORKDIR ${DAPPER_SOURCE} |
||||
|
||||
COPY ./scripts/test-mods /bin/ |
||||
|
||||
ENTRYPOINT ["/bin/test-mods"] |
@ -0,0 +1,10 @@
|
||||
#!/bin/bash |
||||
set -e -x |
||||
|
||||
res=$(go mod edit --json | jq '.Replace[] | select(.Old.Path | contains("k8s.io/")) | .New.Path' | grep -v k3s-io | wc -l) |
||||
if [ $res -gt 0 ];then |
||||
echo "Incorrect kubernetes replacement fork in go.mod" |
||||
exit 1 |
||||
else |
||||
exit 0 |
||||
fi |
Loading…
Reference in new issue