mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 13:41:37 +00:00
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
|
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
|
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
|
||||||
mv /tmp/docker/* /usr/bin
|
mv /tmp/docker/* /usr/bin
|
||||||
- run: make build-image
|
- run: make image
|
||||||
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2.1
|
version: 2
|
||||||
workflow:
|
workflow:
|
||||||
jobs:
|
jobs:
|
||||||
- vet:
|
- vet:
|
||||||
|
|
11
Dockerfile
11
Dockerfile
|
@ -16,9 +16,12 @@ ARG VERSION=dev
|
||||||
# go build -mod=vendor
|
# go build -mod=vendor
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& export GOGC=off \
|
&& export GOGC=off \
|
||||||
|
&& export GO111MODULE=on \
|
||||||
&& export CGO_ENABLED=0 \
|
&& export CGO_ENABLED=0 \
|
||||||
&& export LDFLAGS="-X ${REPO}/config.Version=${VERSION}" \
|
&& 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
|
# Executable image
|
||||||
FROM alpine:3.10
|
FROM alpine:3.10
|
||||||
|
@ -31,9 +34,9 @@ WORKDIR /
|
||||||
|
|
||||||
ENV NETMODE=testnet
|
ENV NETMODE=testnet
|
||||||
COPY --from=builder /neo-go/config /config
|
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/
|
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 \
|
&& export CGO_ENABLED=0 \
|
||||||
&& go build -v -mod=vendor -ldflags $(BUILD_FLAGS) -o ${BINARY} ./cli/main.go
|
&& go build -v -mod=vendor -ldflags $(BUILD_FLAGS) -o ${BINARY} ./cli/main.go
|
||||||
|
|
||||||
image: deps
|
image:
|
||||||
@echo "=> Building 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:latest --build-arg REPO=$(REPO) --build-arg VERSION=$(VERSION) .
|
||||||
@docker build -t cityofzion/neo-go:$(VERSION) --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