mirror of
https://github.com/elyby/chrly.git
synced 2024-11-17 02:32:59 +05:30
35 lines
595 B
YAML
35 lines
595 B
YAML
sudo: required
|
|
|
|
language: go
|
|
go:
|
|
- 1.9
|
|
|
|
services:
|
|
- docker
|
|
|
|
stages:
|
|
- test
|
|
- publish
|
|
|
|
before_install:
|
|
- go get -u github.com/golang/dep/cmd/dep
|
|
|
|
jobs:
|
|
include:
|
|
- stage: test
|
|
script:
|
|
- dep ensure
|
|
- go test ./...
|
|
- stage: publish
|
|
script:
|
|
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
|
- dep ensure
|
|
- >
|
|
env GOOS=linux
|
|
go build
|
|
-o release/chrly
|
|
-ldflags "-X github.com/elyby/chrly/bootstrap.version=latest"
|
|
main.go
|
|
- docker build -t elyby/chrly .
|
|
- docker push elyby/chrly
|