Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
memoriav
Memobase 2020
services
IndexerHelper
Commits
b8a5f8d6
Unverified
Commit
b8a5f8d6
authored
Jun 22, 2020
by
Sebastian Schüpbach
Browse files
change paths
parent
19abd55c
Pipeline
#10351
failed with stages
in 33 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
b8a5f8d6
...
...
@@ -4,56 +4,95 @@ stages:
variables
:
DOCKER_TLS_CERTDIR
:
"
"
PKG_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/webservice
default
:
image
:
golang:1.14
.test_setup
:
&test_setup
-
mkdir -p /go/src/gitlab.switch.ch/
memoriav/memobase-2020/services/histogram
-
mkdir -p /go/src/gitlab.switch.ch/
${CI_PROJECT_NAMESPACE}
-
ln -s $CI_PROJECT_DIR /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram
-
cd /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram
indexer
:lint:
.test
:lint:
stage
:
test
tags
:
[
mbr
]
before_script
:
-
*test_setup
-
go get -u golang.org/x/lint/golint
script
:
-
golint -set_exit_status $
PKG
_PATH
-
golint -set_exit_status $
BIN
_PATH
allow_failure
:
true
indexer
:unit:
.test
:unit:
stage
:
test
tags
:
[
mbr
]
before_script
:
[
*test_setup
]
script
:
-
go test -short $
PKG
_PATH
-
go test -short $
BIN
_PATH
allow_failure
:
true
indexer
:race:
.test
:race:
stage
:
test
tags
:
[
mbr
]
before_script
:
[
*test_setup
]
script
:
-
go test -race -short $
PKG
_PATH
-
go test -race -short $
BIN
_PATH
allow_failure
:
true
#
indexer
:msan:
#
test
:msan:
# stage: test
# tags: [mbr]
# before_script: [*test_setup]
# script:
# - go test -msan -short $
PKG
_PATH
# - go test -msan -short $
BIN
_PATH
# allow_failure: true
indexer
:build:
.test
:build:
stage
:
test
tags
:
[
mbr
]
before_script
:
[
*test_setup
]
script
:
-
go build $PKG_PATH
-
go build $BIN_PATH
histogram:test:lint:
extends
:
.test:lint
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/histogram
histogram:test:unit:
extends
:
.test:unit
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/histogram
histogram:test:race:
extends
:
.test:race
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/histogram
histogram:test:build:
extends
:
.test:build
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/histogram
webservice:test:lint:
extends
:
.test:lint
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/webservice/cmd/webservice
webservice:test:unit:
extends
:
.test:unit
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/webservice/cmd/webservice
webservice:test:race:
extends
:
.test:race
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/webservice/cmd/webservice
webservice:test:build:
extends
:
.test:build
variables
:
BIN_PATH
:
gitlab.switch.ch/memoriav/memobase-2020/services/webservice/cmd/webservice
.build-image
:
stage
:
publish
...
...
@@ -71,7 +110,7 @@ indexer:build:
-
docker push "$IMAGE_TAG"
-
docker logout
indexer:build-tagged-image:
indexer
helper
:build-tagged-image:
extends
:
.build-image
variables
:
IMAGE_TAG
:
"
$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG"
...
...
@@ -82,7 +121,7 @@ indexer:build-tagged-image:
only
:
-
tags
indexer:build-latest-image:
indexer
helper
:build-latest-image:
extends
:
.build-image
variables
:
IMAGE_TAG
:
"
$CI_REGISTRY_IMAGE:latest"
...
...
@@ -93,7 +132,7 @@ indexer:build-latest-image:
only
:
-
master
indexer:build-feature-branch-image:
indexer
helper
:build-feature-branch-image:
extends
:
.build-image
variables
:
IMAGE_TAG
:
"
$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME"
...
...
Dockerfile
View file @
b8a5f8d6
...
...
@@ -6,11 +6,21 @@ COPY . .
RUN
CGO_ENABLED
=
0
GOOS
=
linux
GOARCH
=
amd64 go build
-o
bin/app
-a
gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/webservice
FROM
golang:1.14 as histogram_builder
RUN
adduser
--system
appuser
WORKDIR
$GOPATH/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram
COPY
. .
RUN
CGO_ENABLED
=
0
GOOS
=
linux
GOARCH
=
amd64 go build
-o
bin/histogram
-a
gitlab.switch.ch/memoriav/memobase-2020/services/histogram/cmd/histogram
FROM
perl:5.30-slim-buster
WORKDIR
/app
COPY
--from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY
--from=builder /go/src/git
hub.com/je4/indexer
/bin/app /app
COPY
--from=builder /go/src/git
lab.switch.ch/memoriav/memobase-2020/services/histogram
/bin/app /app
COPY
--from=builder /etc/passwd /etc/passwd
COPY
--from=histogram_builder /go/src/gitlab.switch.ch/memoriav/memobase-2020/services/histogram/bin/app /usr/bin
RUN
apt-get update
&&
\
apt-get
install
-y
exiftool
&&
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment