Merge pull request #324 from nspcc-dev/fix-circleci-workflow-version
Fix CircleCI workflows to work and Docker image to build in CircleCI.
This commit is contained in:
commit
e93a2192b1
3 changed files with 10 additions and 7 deletions
|
@ -87,11 +87,11 @@ jobs:
|
|||
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
|
||||
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
|
||||
mv /tmp/docker/* /usr/bin
|
||||
- run: make build-image
|
||||
- run: make image
|
||||
|
||||
|
||||
workflows:
|
||||
version: 2.1
|
||||
version: 2
|
||||
workflow:
|
||||
jobs:
|
||||
- vet:
|
||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -16,9 +16,12 @@ ARG VERSION=dev
|
|||
# go build -mod=vendor
|
||||
RUN set -x \
|
||||
&& export GOGC=off \
|
||||
&& export GO111MODULE=on \
|
||||
&& export CGO_ENABLED=0 \
|
||||
&& export LDFLAGS="-X ${REPO}/config.Version=${VERSION}" \
|
||||
&& go build -v -mod=vendor -ldflags "${LDFLAGS}" -o /go/bin/node ./cli/main.go
|
||||
&& go mod tidy -v \
|
||||
&& go mod vendor \
|
||||
&& go build -v -mod=vendor -ldflags "${LDFLAGS}" -o /go/bin/neo-go ./cli/main.go
|
||||
|
||||
# Executable image
|
||||
FROM alpine:3.10
|
||||
|
@ -31,9 +34,9 @@ WORKDIR /
|
|||
|
||||
ENV NETMODE=testnet
|
||||
COPY --from=builder /neo-go/config /config
|
||||
COPY --from=builder /go/bin/node /usr/bin/node
|
||||
COPY --from=builder /go/bin/neo-go /usr/bin/neo-go
|
||||
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
|
||||
ENTRYPOINT ["/usr/bin/node"]
|
||||
ENTRYPOINT ["/usr/bin/neo-go"]
|
||||
|
||||
CMD ["node", "--config-path", "./config", "--testnet"]
|
||||
CMD ["neo-go", "--config-path", "./config", "--testnet"]
|
||||
|
|
2
Makefile
2
Makefile
|
@ -14,7 +14,7 @@ build: deps
|
|||
&& export CGO_ENABLED=0 \
|
||||
&& go build -v -mod=vendor -ldflags $(BUILD_FLAGS) -o ${BINARY} ./cli/main.go
|
||||
|
||||
image: deps
|
||||
image:
|
||||
@echo "=> Building image"
|
||||
@docker build -t cityofzion/neo-go:latest --build-arg REPO=$(REPO) --build-arg VERSION=$(VERSION) .
|
||||
@docker build -t cityofzion/neo-go:$(VERSION) --build-arg REPO=$(REPO) --build-arg VERSION=$(VERSION) .
|
||||
|
|
Loading…
Reference in a new issue