File tree Expand file tree Collapse file tree 2 files changed +7
-25
lines changed Expand file tree Collapse file tree 2 files changed +7
-25
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ sudo: required
2
2
language : go
3
3
4
4
go :
5
- - 1.11 .x
5
+ - 1.12 .x
6
6
7
7
services :
8
8
- docker
@@ -12,36 +12,16 @@ addons:
12
12
packages :
13
13
- docker-ce
14
14
15
- before_install :
16
- - make dep
17
- # - go get sigs.k8s.io/kind
18
- # - curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
19
- # - chmod +x ./kubectl
20
- # - kind create cluster
21
- # - export KUBECONFIG="$(kind get kubeconfig-path --name="1")"
22
- # - ./kubectl cluster-info
23
- # - docker build -t podinfo:test -f Dockerfile.ci .
24
- # - ./kubectl run podinfo --image=podinfo:test --port=9898 --image-pull-policy=Never -- ./podinfo --port=9898
25
- # - sleep 5
26
- # - ./kubectl describe deployment podinfo
27
- # - ./kubectl describe po
28
-
29
15
script :
30
- - make test
31
- - make build docker-build
16
+ - make build-container
32
17
33
18
after_success :
34
- - if [ -z "$DOCKER_USER " ]; then
35
- echo "PR build , skipping Docker Hub push";
19
+ - if [ -z "$TRAVIS_TAG " ]; then
20
+ echo "Not a release , skipping container push";
36
21
else
37
22
echo $DOCKER_PASS | docker login -u $DOCKER_USER --password-stdin;
38
- make docker-push;
39
- fi
40
- - if [ -z "$QUAY_USER" ]; then
41
- echo "PR build, skipping Quay push";
42
- else
43
23
echo $QUAY_PASS | docker login -u $QUAY_USER --password-stdin quay.io;
44
- make quay- push;
24
+ make push-container ;
45
25
fi
46
26
47
27
deploy :
Original file line number Diff line number Diff line change 8
8
9
9
RUN GOPROXY=https://proxy.golang.org go mod download
10
10
11
+ RUN go test -v -race ./...
12
+
11
13
RUN GIT_COMMIT=$(git rev-list -1 HEAD) && \
12
14
CGO_ENABLED=0 GOOS=linux go build -ldflags "-s -w \
13
15
-X github.com/stefanprodan/podinfo/pkg/version.REVISION=${GIT_COMMIT}" \
You can’t perform that action at this time.
0 commit comments