From 8376d0d182e95700e79930d632f4347445b1b79b Mon Sep 17 00:00:00 2001 From: Lan Tian Date: Tue, 8 Jan 2019 14:42:36 +0800 Subject: [PATCH] Fix travis CI problems --- .travis.yml | 7 +++++-- frontend/Dockerfile | 2 +- proxy/Dockerfile | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6f8055..cd0b2ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,9 @@ sudo: required services: - docker -language: bash +language: go +go: + - "1.10" env: - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=i386 - PROGRAM=frontend IMAGE_NAME=bird-lg-go IMAGE_ARCH=amd64 @@ -31,7 +33,8 @@ script: if [ "$IMAGE_ARCH" == "arm64v8" ]; then IMAGE_ARCH_GO=arm64; fi # Build Go binary - GOOS=linux GOARCH=$IMAGE_ARCH_GO go build -ldflags="-s -w" -o $PROGRAM $PROGRAM/*.go + mkdir build + GOOS=linux GOARCH=$IMAGE_ARCH_GO go build -ldflags="-s -w" -o build/$PROGRAM $PROGRAM/*.go # Build image docker build \ diff --git a/frontend/Dockerfile b/frontend/Dockerfile index e40c364..f0e7e2b 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -2,5 +2,5 @@ ARG THIS_ARCH_ALT=amd64 FROM multiarch/alpine:${THIS_ARCH_ALT}-edge LABEL Lan Tian "lantian@lantian.pub" -COPY frontend / +COPY build/frontend / ENTRYPOINT ["/frontend"] diff --git a/proxy/Dockerfile b/proxy/Dockerfile index 3b869cc..c0c04de 100644 --- a/proxy/Dockerfile +++ b/proxy/Dockerfile @@ -2,5 +2,5 @@ ARG THIS_ARCH_ALT=amd64 FROM multiarch/alpine:${THIS_ARCH_ALT}-edge LABEL Lan Tian "lantian@lantian.pub" -COPY proxy / +COPY build/proxy / ENTRYPOINT ["/proxy"]