Verified Commit 3c02f14d authored by Sebastian Schüpbach's avatar Sebastian Schüpbach
Browse files

setup CI workflow

parent 1f98caea
Pipeline #8444 passed with stages
in 2 minutes and 54 seconds
include:
- project: 'memoriav/memobase-2020/utilities/ci-templates'
file: 'docker-image.yml'
variables:
DOCKER_TLS_CERTDIR: ""
stages:
- test
- publish
test:
stage: test
tags:
- mbr
image: golang:1.14
variables:
PROJECT_PATH: gitlab.switch.ch/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME
before_script:
- mkdir -p /go/src/gitlab.switch.ch/$CI_PROJECT_NAMESPACE/
- ln -s $CI_PROJECT_DIR /go/src/$PROJECT_PATH
- cd /go/src/$PROJECT_PATH && go get ./...
script:
- go test $PROJECT_PATH/main
FROM golang:1.14 as builder
RUN adduser --system appuser
WORKDIR $GOPATH/src/gitlab.switch.ch/memoriav/memobase-2020/streaming-server
COPY . .
# Fetch dependencies
RUN go get -d -v ./...
# Compile the binary. Mind the flags because it has to work in the next image.
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bin/app -a gitlab.switch.ch/memoriav/memobase-2020/streaming-server/main
FROM scratch
WORKDIR /
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /go/src/gitlab.switch.ch/memoriav/memobase-2020/streaming-server/bin/app /app
COPY --from=builder /etc/passwd /etc/passwd
USER appuser
EXPOSE 81
ENTRYPOINT ["/app"]
# Streaming Server
Test Implementation for Media Streaming Server
## Docker
```sh
docker run -v<path_to_config>:/memostream.toml memostream
```
Supports Markdown
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