Skip to content

Instantly share code, notes, and snippets.

@rust20
rust20 / .gitlab-ci.yml
Created Apr 2, 2019
complete gitlab CI
View .gitlab-ci.yml
stages:
- test
- lint
- deploy
variables:
DOCKER_REGISTRY: "registry.docker.ppl.cs.ui.ac.id/ppla4"
API_IMAGE: "yuk-recycle-api"
View docker-compose.yml
version: '2'
services:
db:
image: postgres:alpine
environment:
POSTGRES_NAME: postgres
POSTGRES_PASSWORD: visiland
POSTGRES_USER: postgres
volumes:
- db-data:/var/lib/postgresql/data
View Dockerfile
FROM golang:latest
ADD . $GOWORKDIR
WORKDIR $GOWORKDIR
RUN go get ./...
ENTRYPOINT ["go", "run", "main.go"]
@rust20
rust20 / .gitlab-ci.yml
Last active Apr 2, 2019
gitlab ci test
View .gitlab-ci.yml
stages:
- test
- lint
- deploy
backend:test:
image: golang
stage: test
cache:
key: ${CI_COMMIT_REF_SLUG}