Commit b7fad59c authored by Pavel's avatar Pavel

CI

parent f055d8e3
Pipeline #59278012 failed with stages
in 23 seconds
services:
- docker:dind
variables:
IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
DH_IMAGE_NAME: tokend/identity-autoverifier
stages:
- build
- publish
# build and publish docker image to the registry
build:
image: docker:latest
stage: build
tags:
- tokend
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker build --pull -t $IMAGE_NAME .
- docker push $IMAGE_NAME
publish dockerhub:
image: docker:latest
stage: publish
tags:
- tokend
only:
- /^\d+\.\d+\.\d+.*$/
script:
- RELEASE=$CI_COMMIT_REF_NAME
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- docker login -u $DOCKERHUB_USER -p $DOCKERHUB_PWD
- docker pull $IMAGE_NAME
- docker tag $IMAGE_NAME $DH_IMAGE_NAME:$RELEASE
- docker push $DH_IMAGE_NAME:$RELEASE
\ No newline at end of file
FROM golang:1.12
WORKDIR /go/src/gitlab.com/tokend/identity-autoverifier-svc
COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -o /usr/local/bin/identity-autoverifier-svc gitlab.com/tokend/identity-autoverifier-svc
###
FROM alpine:3.9
COPY --from=0 /usr/local/bin/identity-autoverifier-svc /usr/local/bin/identity-autoverifier-svc
RUN apk add --no-cache ca-certificates
ENTRYPOINT ["identity-autoverifier-svc"]
ERRO[0000] app panicked error="runtime error: invalid memory address or nil pointer dereference" pid=87465 stack="
gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/logan/v3/errors.FromPanic
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/logan/v3/errors/errors.go:23
gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/logan/v3.(*Entry).WithRecover
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/logan/v3/entry.go:21
gitlab.com/tokend/identity-verifier-svc/internal/cli.Run.func1
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/internal/cli/main.go:18
runtime.call32
\t/Users/admin/.goenv/versions/1.10.8/src/runtime/asm_amd64.s:573
runtime.gopanic
\t/Users/admin/.goenv/versions/1.10.8/src/runtime/panic.go:502
runtime.panicmem
\t/Users/admin/.goenv/versions/1.10.8/src/runtime/panic.go:63
runtime.sigpanic
\t/Users/admin/.goenv/versions/1.10.8/src/runtime/signal_unix.go:388
gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/figure.(*Figurator).SetField
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/figure/main.go:96
gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/figure.(*Figurator).Please
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/vendor/gitlab.com/distributed_lab/figure/main.go:81
gitlab.com/tokend/identity-verifier-svc/internal/config.NewApi
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/internal/config/api.go:19
gitlab.com/tokend/identity-verifier-svc/internal/config.New
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/internal/config/main.go:14
gitlab.com/tokend/identity-verifier-svc/internal/cli.Run.func2
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/internal/cli/main.go:34
gitlab.com/tokend/identity-verifier-svc/vendor/github.com/urfave/cli.Command.Run
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/vendor/github.com/urfave/cli/command.go:198
gitlab.com/tokend/identity-verifier-svc/vendor/github.com/urfave/cli.(*App).Run
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/vendor/github.com/urfave/cli/app.go:255
gitlab.com/tokend/identity-verifier-svc/internal/cli.Run
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/internal/cli/main.go:48
main.main
\t/Users/admin/go/src/gitlab.com/tokend/identity-verifier-svc/main.go:9
runtime.main
\t/Users/admin/.goenv/versions/1.10.8/src/runtime/proc.go:198
runtime.goexit
\t/Users/admin/.goenv/versions/1.10.8/src/runtime/asm_amd64.s:2361"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment