File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ Dockerfile*
33cloudcli
44cloudcli- *
55. *
6+ vendor
Original file line number Diff line number Diff line change 11cloudcli
22cloudcli- *
33.idea
4+ python
5+ vendor
6+ cloudcli.exe
Original file line number Diff line number Diff line change @@ -5,11 +5,7 @@ ARG GOARCH
55ENV GOOS ${GOOS}
66ENV GOARCH ${GOARCH}
77
8- RUN go get -v github.com/spf13/cobra/cobra
9- RUN go get -v github.com/go-resty/resty
10- RUN go get -v gopkg.in/yaml.v2
11- RUN go get -v github.com/cpuguy83/go-md2man/md2man
12- RUN go get -v golang.org/x/crypto/ssh
8+ RUN curl -f https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
139
1410RUN mkdir -p /go/src/github.com/cloudwm/cli
1511WORKDIR /go/src/github.com/cloudwm/cli
Original file line number Diff line number Diff line change 1+ required = [" github.com/russross/blackfriday" ]
2+
3+ [[constraint ]]
4+ name = " github.com/go-resty/resty"
5+ version = " 1.12.0"
6+
7+ [[constraint ]]
8+ name = " github.com/mitchellh/go-homedir"
9+ version = " 1.1.0"
10+
11+ [[constraint ]]
12+ name = " github.com/spf13/cobra"
13+ version = " 0.0.5"
14+
15+ [[constraint ]]
16+ name = " github.com/spf13/viper"
17+ version = " 1.4.0"
18+
19+ [[constraint ]]
20+ branch = " master"
21+ name = " golang.org/x/crypto"
22+
23+ [[constraint ]]
24+ name = " gopkg.in/yaml.v2"
25+ version = " 2.2.2"
26+
27+ [[constraint ]]
28+ branch = " master"
29+ name = " github.com/russross/blackfriday"
30+
31+ [prune ]
32+ go-tests = true
33+ unused-packages = true
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ start_build_environment() {
1717 -f " ${CLOUDCLI_PROJECT_PATH} /Dockerfile.build" " ${CLOUDCLI_PROJECT_PATH} " && \
1818 docker run -d --rm --name " ${BUILD_CONTAINER_NAME} " -v " ${CLOUDCLI_PROJECT_PATH} :/go/src/github.com/cloudwm/cli" \
1919 -v " ${CLOUDCLI_ETC_PATH} :${CLOUDCLI_ETC_PATH} " --network host \
20- " ${BUILD_CONTAINER_NAME} " tail -f /dev/null
20+ " ${BUILD_CONTAINER_NAME} " tail -f /dev/null && \
21+ docker exec -it " ${BUILD_CONTAINER_NAME} " dep ensure
2122}
2223
2324run () {
Original file line number Diff line number Diff line change @@ -14,12 +14,17 @@ make_build_environment() {
1414 local go_arch=" ${2} "
1515 local docker_image=" ${3} "
1616 if docker pull " ${docker_image} " ; then
17- docker build --cache-from " ${docker_image} " --build-arg GOOS=" ${go_os} " --build-arg GOARCH=" ${go_arch} " \
18- -t " ${docker_image} " -f ./Dockerfile.build .
17+ docker build --build-arg GOOS=" ${go_os} " --build-arg GOARCH=" ${go_arch} " \
18+ -t " ${docker_image} " -f ./Dockerfile.build \
19+ --cache-from " ${docker_image} " \
20+ .
1921 else
20- docker build -t " ${docker_image} " -f ./Dockerfile.build .
22+ docker build --build-arg GOOS=" ${go_os} " --build-arg GOARCH=" ${go_arch} " \
23+ -t " ${docker_image} " -f ./Dockerfile.build \
24+ .
2125 fi && \
22- docker push " ${docker_image} "
26+ docker push " ${docker_image} " && \
27+ docker run --rm -v " ` pwd` :/go/src/github.com/cloudwm/cli" " ${docker_image} " dep ensure
2328}
2429
2530get_binary_ext () {
You can’t perform that action at this time.
0 commit comments