Skip to content
Snippets Groups Projects
Commit 2ef87f9d authored by scott.wang's avatar scott.wang
Browse files

Fix dockerfile and build the latest code

parent e77f9447
No related branches found
No related tags found
No related merge requests found
......@@ -22,16 +22,14 @@ script:
- echo ${TRAVIS_PULL_REQUEST_SLUG}
- echo ${TRAVIS_PULL_REQUEST_SHA}
- echo ${TRAVIS_REPO_SLUG}
- exit 1
# license-check
# start zookeeper registry insecure listen in [:]:2181
- echo 'start integrate-test'
# start zookeeper registry insecure listen in [:]:2181
- docker run -d --network host zookeeper
- ROOTDIR=$(pwd)
- echo ${TRAVIS_COMMIT} ${ROOTDIR}
- cd ./test/integrate/dubbo/go-client && docker build . -t ci-consumer --build-arg COMMITID=${TRAVIS_COMMIT} && cd $ROOTDIR
- cd ./test/integrate/dubbo/go-server && docker build . -t ci-provider --build-arg COMMITID=${TRAVIS_COMMIT} && cd $ROOTDIR
- cd ./test/integrate/dubbo/go-client && docker build . -t ci-consumer --build-arg PR_ORIGIN_REPO=${TRAVIS_PULL_REQUEST_SLUG} PR_ORIGIN_COMMITID=${TRAVIS_PULL_REQUEST_SHA} && cd $ROOTDIR
- cd ./test/integrate/dubbo/go-server && docker build . -t ci-provider --build-arg PR_ORIGIN_REPO=${TRAVIS_PULL_REQUEST_SLUG} PR_ORIGIN_COMMITID=${TRAVIS_PULL_REQUEST_SHA} && cd $ROOTDIR
- docker run -d --network host ci-provider
- docker run -it --network host ci-consumer
- exit 0
......
......@@ -7,11 +7,15 @@ WORKDIR /go/src/github.com/apache/dubbo-go/test/integrate/dubbo/go-client
ENV CONF_CONSUMER_FILE_PATH "client.yml"
ENV APP_LOG_CONF_FILE "log.yml"
ARG COMMITID
ARG PR_ORIGIN_REPO
ARG PR_ORIGIN_COMMITID
ADD . /go/src/github.com/apache/dubbo-go/test/integrate/dubbo/go-client
# update dubbo-go to current commit id
RUN go get -u github.com/apache/dubbo-go@${COMMITID}
RUN echo "github.com/apache/dubbo-go will be replace to github.com/${PR_ORIGIN_REPO}@${PR_ORIGIN_COMMITID}"
RUN go mod edit -replace=github.com/apache/dubbo-go=github.com/${PR_ORIGIN_REPO}@${PR_ORIGIN_COMMITID}
RUN go install github.com/apache/dubbo-go/test/integrate/dubbo/go-client
CMD go-client
\ No newline at end of file
......@@ -7,11 +7,14 @@ WORKDIR /go/src/github.com/apache/dubbo-go/test/integrate/dubbo/go-server
ENV CONF_PROVIDER_FILE_PATH "server.yml"
ENV APP_LOG_CONF_FILE "log.yml"
ARG COMMITID
ARG PR_ORIGIN_REPO
ARG PR_ORIGIN_COMMITID
ADD . /go/src/github.com/apache/dubbo-go/test/integrate/dubbo/go-server
# update dubbo-go to current commit id
RUN go get -u github.com/apache/dubbo-go@${COMMITID}
RUN echo "github.com/apache/dubbo-go will be replace to github.com/${PR_ORIGIN_REPO}@${PR_ORIGIN_COMMITID}"
RUN go mod edit -replace=github.com/apache/dubbo-go=github.com/${PR_ORIGIN_REPO}@${PR_ORIGIN_COMMITID}
RUN go install github.com/apache/dubbo-go/test/integrate/dubbo/go-server
CMD go-server
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment