diff --git a/.circleci/config.yml b/.circleci/config.yml index 8cb10a06..4d64ac38 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -90,7 +90,6 @@ jobs: - run: name: "Run example tests" command: | - cp -r "$DOCKER_CERT_PATH" ./circleci-certs script/ci/step dobi test-examples - store_artifacts: path: _results diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac240bb6..a6147167 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,5 @@ -- repo: git://github.com/pre-commit/pre-commit-hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks.git sha: v0.7.1 hooks: - id: check-merge-conflict @@ -14,7 +15,7 @@ - id: check-json exclude: '^vendor/' -- repo: git://github.com/dnephin/pre-commit-golang +- repo: https://github.com/dnephin/pre-commit-golang.git sha: v0.3.5 hooks: - id: golangci-lint diff --git a/dockerfiles/Dockerfile.build b/dockerfiles/Dockerfile.build index 862c062a..e0cf3bbf 100644 --- a/dockerfiles/Dockerfile.build +++ b/dockerfiles/Dockerfile.build @@ -2,14 +2,14 @@ FROM golang:1.13-alpine RUN apk add -U git bash curl tree ARG FILEWATCHER_SHA=v0.3.2 -RUN go get -d github.com/dnephin/filewatcher && \ +RUN git clone https://github.com/dnephin/filewatcher.git /go/src/github.com/dnephin/filewatcher && \ cd /go/src/github.com/dnephin/filewatcher && \ git checkout -q "$FILEWATCHER_SHA" && \ go build -v -o /usr/bin/filewatcher . && \ rm -rf /go/src/* /go/pkg/* /go/bin/* ARG GOTESTSUM=v0.4.0 -RUN go get -d gotest.tools/gotestsum && \ +RUN git clone https://github.com/gotestyourself/gotestsum.git /go/src/gotest.tools/gotestsum && \ cd /go/src/gotest.tools/gotestsum && \ git checkout -q "$GOTESTSUM" && \ go build -v -o /usr/bin/gotestsum . && \ @@ -19,7 +19,7 @@ RUN go get github.com/mitchellh/gox && \ cp /go/bin/gox /usr/bin && \ rm -rf /go/src/* /go/pkg/* /go/bin/* -RUN go get -d github.com/golang/mock/mockgen && \ +RUN git clone https://github.com/golang/mock.git /go/src/github.com/golang/mock && \ cd /go/src/github.com/golang/mock && \ git checkout -q "v1.0.0" && \ go build -v -o /usr/local/bin/mockgen ./mockgen && \ diff --git a/dockerfiles/Dockerfile.docs b/dockerfiles/Dockerfile.docs index 45686740..ea09231a 100644 --- a/dockerfiles/Dockerfile.docs +++ b/dockerfiles/Dockerfile.docs @@ -1,8 +1,8 @@ -FROM alpine:3.10 +FROM golang:1.13-alpine RUN apk -U add \ - python \ - py-pip \ + python3 \ + py3-pip \ go \ bash \ git \ @@ -11,11 +11,17 @@ RUN apk -U add \ ENV GOPATH=/go RUN git config --global http.https://gopkg.in.followRedirects true -RUN go get github.com/dnephin/filewatcher && \ - cp /go/bin/filewatcher /usr/bin/ && \ + +ARG FILEWATCHER_SHA=v0.3.2 +RUN git clone https://github.com/dnephin/filewatcher.git /go/src/github.com/dnephin/filewatcher && \ + cd /go/src/github.com/dnephin/filewatcher && \ + git checkout -q "$FILEWATCHER_SHA" && \ + go build -v -o /usr/bin/filewatcher . && \ rm -rf /go/src/* /go/pkg/* /go/bin/* -RUN pip install sphinx==1.4.5 +WORKDIR /pip +COPY requirements.docs.txt . +RUN pip install -r requirements.docs.txt WORKDIR /go/src/github.com/dnephin/dobi ENV PS1="# " diff --git a/dockerfiles/Dockerfile.lint b/dockerfiles/Dockerfile.lint index fb119379..90d398c1 100644 --- a/dockerfiles/Dockerfile.lint +++ b/dockerfiles/Dockerfile.lint @@ -1,13 +1,15 @@ FROM golang:1.14-alpine RUN apk add -U python3 py-pip python3-dev musl-dev gcc git bash -RUN pip install --ignore-installed pre-commit +RUN pip install --ignore-installed 'pre-commit<3.0' COPY --from=golangci/golangci-lint:v1.24.0 /usr/bin/golangci-lint /usr/bin/golangci-lint WORKDIR /go/src/github.com/dnephin/dobi COPY .pre-commit-config.yaml ./ -RUN git init && pre-commit install-hooks +RUN git init && \ + pre-commit install-hooks && \ + git config --global --add safe.directory /go/src/github.com/dnephin/dobi ENV CGO_ENABLED=0 CMD ["pre-commit", "run", "-a", "-v"] diff --git a/dockerfiles/requirements.docs.in b/dockerfiles/requirements.docs.in new file mode 100644 index 00000000..a6af5eac --- /dev/null +++ b/dockerfiles/requirements.docs.in @@ -0,0 +1,4 @@ +sphinx==1.6.7 +markupsafe==0.23 +Jinja2<3 +docutils diff --git a/dockerfiles/requirements.docs.txt b/dockerfiles/requirements.docs.txt new file mode 100644 index 00000000..c6dadde7 --- /dev/null +++ b/dockerfiles/requirements.docs.txt @@ -0,0 +1,49 @@ +# +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: +# +# pip-compile dockerfiles/requirements.docs.in +# +alabaster==0.7.13 + # via sphinx +babel==2.13.1 + # via sphinx +certifi==2023.7.22 + # via requests +charset-normalizer==3.3.2 + # via requests +docutils==0.20.1 + # via + # -r dockerfiles/requirements.docs.in + # sphinx +idna==3.4 + # via requests +imagesize==1.4.1 + # via sphinx +jinja2==2.11.3 + # via + # -r dockerfiles/requirements.docs.in + # sphinx +markupsafe==0.23 + # via + # -r dockerfiles/requirements.docs.in + # jinja2 +pygments==2.16.1 + # via sphinx +requests==2.31.0 + # via sphinx +six==1.15.0 + # via sphinx +snowballstemmer==2.2.0 + # via sphinx +sphinx==1.6.7 + # via -r dockerfiles/requirements.docs.in +sphinxcontrib-serializinghtml==1.1.5 + # via sphinxcontrib-websupport +sphinxcontrib-websupport==1.2.4 + # via sphinx +urllib3==2.0.7 + # via requests + +# The following packages are considered to be unsafe in a requirements file: +# setuptools