From 12505bd17d579e3d0b78a454ab956dd77e8c68a5 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 20 May 2016 16:35:48 +0800 Subject: [PATCH] replace go path with global variable. Signed-off-by: Bo-Yi Wu --- docker/docker-compose.testing.yml | 2 +- docker/golang/Dockerfile | 3 +++ docker/testing.sh | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/docker-compose.testing.yml b/docker/docker-compose.testing.yml index 5d755b7..2ece6fe 100644 --- a/docker/docker-compose.testing.yml +++ b/docker/docker-compose.testing.yml @@ -7,7 +7,7 @@ gorush: - ANDROID_API_KEY - ANDROID_TEST_TOKEN volumes: - - ../:/go/src/github.com/appleboy/gorush + - ../:/app command: /bin/sh -c './docker/testing.sh' redis: diff --git a/docker/golang/Dockerfile b/docker/golang/Dockerfile index 282b7fc..d4730eb 100644 --- a/docker/golang/Dockerfile +++ b/docker/golang/Dockerfile @@ -8,4 +8,7 @@ RUN apk update \ # install glide package management. RUN go get github.com/Masterminds/glide && cd $GOPATH/src/github.com/Masterminds/glide && make install +RUN mkdir /app && mkdir -p $GOPATH/src/github.com/appleboy +RUN ln -sf /app $GOPATH/src/github.com/appleboy/gorush + WORKDIR $GOPATH/src/github.com/appleboy/gorush diff --git a/docker/testing.sh b/docker/testing.sh index c6e7240..215ba5d 100755 --- a/docker/testing.sh +++ b/docker/testing.sh @@ -1,6 +1,6 @@ #!/bin/sh # -cd /go/src/github.com/appleboy/gorush +cd ${GOPATH}/src/github.com/appleboy/gorush sed -i"" -e "s/localhost/redis/g" config/config.yml sed -i"" -e "s/localhost/redis/g" gorush/status_test.go sed -i"" -e "s/localhost/redis/g" storage/redis/redis_test.go