mirror of
https://github.com/elyby/chrly.git
synced 2025-01-05 11:41:49 +05:30
Exclude deployment for pull requests, move docker and sudo requirements to deploy step
This commit is contained in:
parent
a8e4f7ae56
commit
bc1427dd1f
13
.travis.yml
13
.travis.yml
@ -1,16 +1,11 @@
|
|||||||
sudo: required
|
|
||||||
|
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.13
|
- "1.13"
|
||||||
|
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- test
|
- test
|
||||||
- name: deploy
|
- name: deploy
|
||||||
if: branch = master OR tag IS present
|
if: env(TRAVIS_PULL_REQUEST) = false AND (branch = master OR tag IS present)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- go get -u github.com/golang/dep/cmd/dep
|
- go get -u github.com/golang/dep/cmd/dep
|
||||||
@ -22,7 +17,11 @@ jobs:
|
|||||||
script:
|
script:
|
||||||
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
|
- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
|
||||||
- bash <(curl -s https://codecov.io/bash)
|
- bash <(curl -s https://codecov.io/bash)
|
||||||
|
|
||||||
- stage: deploy
|
- stage: deploy
|
||||||
|
sudo: required
|
||||||
|
services:
|
||||||
|
- docker
|
||||||
script:
|
script:
|
||||||
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
|
||||||
- export DOCKER_TAG="${TRAVIS_TAG:-dev}"
|
- export DOCKER_TAG="${TRAVIS_TAG:-dev}"
|
||||||
|
Loading…
Reference in New Issue
Block a user