-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
79 lines (63 loc) · 1.78 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
language: go
branches:
only:
- master
- /^v.*$/
go:
- "1.10.x"
sudo: false
services:
- docker
before_install:
- docker-compose up -d
- |
jq --version
ctr=0
max_retries=50
while [ $(curl -I -u "root:123qwe123" http://localhost:10080/users/sign_in | head -1 | grep 200 | wc -l | tr -d ' ') -ne 1 ]; do
ctr=`expr $ctr + 1`
echo waiting for gitlab to come up
sleep 20
if [ $ctr == $max_retries ]; then
echo "max retries (${max_retries}) reached"
exit 1
fi
done
###################################################
# WARM UP TIME (don't mind me)
###################################################
sleep_time=100
echo "sleeping for ${sleep_time} seconds"
sleep ${sleep_time}
source testdata/credentials.sh
env | grep GITLAB
###################################################
echo "============ setting up test data ============="
GITLAB_USERNAME=$GITLAB_USERNAME GITLAB_PASSWORD=$GITLAB_PASSWORD GITLAB_HTTP_URL=$GITLAB_HTTP_URL ./testdata/seeder.sh
echo "============ test data completed ============="
- go get github.com/golang/lint/golint
- make getdep
script:
- golint -set_exit_status ./...
- |
source testdata/credentials.sh
go run main.go get users
go run main.go get groups
go run main.go get projects
travis_wait 30 make coverage
- bash <(curl -s https://codecov.io/bash) # Set CODECOV_TOKEN in your environment variables.
after_script:
- sleep 1
before_deploy:
- VERSION=${TRAVIS_TAG} make all
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file:
- ./bin/gitlabctl-darwin-amd64
- ./bin/gitlabctl-linux-amd64
- ./bin/gitlabctl-windows-amd64.exe
- ./bin/shasum256.txt
skip_cleanup: true
on:
tags: true