File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ services:
4
4
- docker
5
5
go :
6
6
- " 1.10"
7
+ script :
8
+ - echo "Nginx ASG sync - commit:${TRAVIS_COMMIT}"
9
+ - make BUILD_IN_CONTAINER=0 all
7
10
before_install :
8
11
- echo "PR Slug:${TRAVIS_PULL_REQUEST_SLUG}"
9
12
- if [[ "${TRAVIS_PULL_REQUEST_SLUG}" == "nginxinc/nginx-asg-sync" || "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
Original file line number Diff line number Diff line change 1
1
GO_DOCKER_RUN = docker run --rm -v $(shell pwd) :/go/src/github.com/nginxinc/nginx-asg-sync -v $(shell pwd) /build_output:/build_output -w /go/src/github.com/nginxinc/nginx-asg-sync/cmd/sync
2
2
GOLANG_CONTAINER = golang:1.10
3
+ BUILD_IN_CONTAINER = 1
3
4
4
5
all : amazon centos7 ubuntu-trusty ubuntu-xenial
5
6
6
7
test :
8
+ ifeq ($(BUILD_IN_CONTAINER ) ,1)
7
9
$(GO_DOCKER_RUN) $(GOLANG_CONTAINER) go test
10
+ else
11
+ go test ./...
12
+ endif
8
13
9
14
compile : test
15
+ ifeq ($(BUILD_IN_CONTAINER ) ,1)
10
16
$(GO_DOCKER_RUN) $(GOLANG_CONTAINER) go build -o /build_output/nginx-asg-sync
17
+ else
18
+ go build -o ./build_output/nginx-asg-sync github.com/nginxinc/nginx-asg-sync/cmd/sync
19
+ endif
11
20
12
21
amazon : compile
13
22
make -C build/package/builders/amazon/
You can’t perform that action at this time.
0 commit comments