-
Notifications
You must be signed in to change notification settings - Fork 34
/
.travis.yml
46 lines (45 loc) · 1.68 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
os: linux
services: docker
dist: jammy
language: go
env:
global:
- DEFAULT_BRANCH: master
- GOPROXY: https://proxy.golang.org,https://goproxy.io,direct
jobs:
include:
- stage: check
if: tag IS NOT present
sudo: false
go: 1.22.5
before_install:
- go install github.com/mattn/goveralls@v0.0.12
install:
- export PATH=$PATH:$GOPATH/bin
script:
- make goinstall
- make check >& /tmp/check.log
after_failure:
- grep -C 200 FAIL /tmp/check.log
- tail -200 /tmp/check.log
after_success:
- tail -200 /tmp/check.log
- $GOPATH/bin/goveralls -coverprofile=covprof-ipam,covprof-index,covprof-apicapi,covprof-hostagent,covprof-controller,covprof-gbpserver -service=travis-pro
- stage: build-images
if: tag IS present
before_install:
- mkdir -vp ~/.docker/cli-plugins/
- curl --silent -L "https://github.com/docker/buildx/releases/download/v0.3.0/buildx-v0.3.0.linux-amd64" > ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx
install:
- pip install pytz
go: 1.22.5
go_import_path: github.com/noironetworks/aci-containers
before_script:
- export DOCKER_BUILDKIT=1
- export UPSTREAM_ID=81c2369
script:
- echo "Skip running UTs"
- git clone http://www.github.com/noironetworks/cicd -b main /tmp/cicd
- /tmp/cicd/travis/check-git-tag.sh; RETURN_CODE=$? ; if [ $RETURN_CODE -eq 140 ]; then travis_terminate 0; elif [ $RETURN_CODE -ne 0 ]; then travis_terminate $RETURN_CODE; fi
- /tmp/cicd/travis/build-push-aci-containers-images.sh || travis_terminate 1