forked from kubernetes-sigs/dashboard-metrics-scraper
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (38 loc) · 1.09 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Travis continuous integration system configuration file.
# Read more at: http://docs.travis-ci.com/user/customizing-the-build/
sudo: required
dist: focal
language: go
go:
- "1.18"
go_import_path: github.com/kubernetes-sigs/dashboard-metrics-scraper
git:
depth: 250
quiet: true
install:
- echo "Don't run anything."
before_script:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) edge"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- sudo service docker restart
- docker --version
jobs:
include:
- stage: test
script: go test -v ./...
- stage: deploy
script:
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- hack/deploy.sh
- stage: release
script:
- docker login -u $DOCKER_RELEASE_USER -p $DOCKER_RELEASE_PASS
- hack/deploy.sh
stages:
- test
- name: deploy
if: branch = master AND type != pull_request
- name: release
if: tag IS present AND type != pull_request