Skip to content
This repository has been archived by the owner on May 30, 2018. It is now read-only.

Commit

Permalink
Merge pull request #6 from hypriot/build-like-upstream
Browse files Browse the repository at this point in the history
build swarm like upstream
  • Loading branch information
Govinda-Fichtner committed May 6, 2016
2 parents 620655b + 80df80e commit 1a9ce0e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .drone.sec
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.JHPTWbdsu4USKU0F-C8b_DDNACMoFrvjKC8TMRq809PkSCz7_iux_fuBs-87bbmxxNwhWMnX0MBAhs0naIgNDv5yDHaOHC_VlkXnVuF25iGSPBXzTjmcjLGKR6ekP8y2N4fmfXwv97t1YyUOILV-Y13Pt8bKS4-ITKewiuGiP0M1HXJxRuCvFpektDXQJV1DzUU-jtuftbM1liPTOy0u57EJiVldTOWvbnfYFUQ1IsDqgUp7sFNL2Ej7K0l7r7KqEctQgTH0D9_SV5H9Yype7aIKZR4FiJGuKM6FN29x5v_rEGrbN3mO8Af0vj_GFbT1pDtomFG7uf318v7falFfZw.2rpJWQ8OLuShk0gZ.3kQwlNjT2O_8zkSu2wZo3tz4bq224LiLkkQ-GTQks4jVli589xlRt8Vxayuf1NtrXaJkWT5Tl-zj9RO9zh2OEpNNg-FEpUhdAclfcvb74bLXuLm7zh4qTR_M1XuJ02Kgdh2I5xAJ8zf7b979gIgYa66aIoe_-wyb-or5vmnAD4RzsKAjOkX6Rx-t5JLESvDQokBfoGbFbdcVi27e2xJPUOh3oYgehyPlGDNOPDP0Kp4nkGOyjWuvCL5KC2bG5c3Vl2T2phdoE_hkLbYMZXXX4GaJYJhSZDilfJdWEWzKH62p_ewkVqg2fkkFuF-LCMgqmqD-lK0T8SXInsXhKg9dhE7NrtS4lpCuPC0oVzBxjf0TgXjCTgOGj7nIZgzvhqSLSto1yRPylhWYlGRpwpnDIS0lAcmNToI9Je_3v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lQNjBo5YSFHCbSh8ssd_UM0osIarx43o0UuRmZkgRkFrlnajDrkDYRpKlHofDeetNUVKtstP3oCIOBc9KGZ8gq0gzWzKqLwlJNcSelwPiKaEs5X6zUhfnm33vrKl4C-dh2wi8zRzc1OstSPTsm0U4w5ZKKWbP5jaUGuK3pRN0o_8V6YWpAYc8c38zQUyH5gxxNDKCUYHYoca_6FpdhLARITOwxls7OzGNaCWc5Axq6I5zVOOVk84kV8Gj3eU9hEPrgWcEpgOgf5Ehi4Z0NhtczVk42Z0ZIDoqKIOHhBJ8jnhIBjzdbnEloUWWdc4EX7RpvkaS6dkdQvojQBo5Z4aA7ImYRt-wGpfAMeuRy7WMz9VDzhKeAuEprNf6zLR4o6RFS4hyExMSZXwU8uiq6ZSsHG0HKdcZGI8nywoffSu9fq2TIyjFSL6_6-fxV5F03_sQytQcsMiE91YWYNesXpj98d8-d4hzi7m3CIcpAj3Bmg1ba_zRVUpZQ.DURyhwzUNTb2W2n1DRVGIg
33 changes: 24 additions & 9 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,33 @@ build:
- export DESCRIPTION="$(cat DESCRIPTION)"
- export DEPENDENCIES="$(cat DEPENDENCIES)"
- apt-get update && apt-get install -y mercurial ca-certificates
- export VERSION=v1.2.0
- export VERSION=v1.2.1
- git clone --branch ${VERSION} https://github.com/docker/swarm ${GOPATH}/src/github.com/docker/swarm
- cd ${GOPATH}/src/github.com/docker/swarm
- go get -v github.com/tools/godep
# - go get -v -d github.com/docker/swarm
- echo "get dependencies"
- git clone -b v1.10.0 https://github.com/docker/docker /drone/src/github.com/docker/docker
- go get -v -d ./...
- go get github.com/golang/lint/golint
- go get github.com/GeertJohan/fgt
- script/validate-gofmt
- go vet `go list ./... | grep -v /vendor/`
- fgt golint ./... | grep -v vendor/ | tee /dev/stderr
# Lint shell files and make sure they are not space indented.
- fgt find test/ -type f \( -name "*.sh" -or -name "*.bash" -or -name "*.bats" \) -exec grep -Hn -e "^ " {} \;
- export GO15VENDOREXPERIMENT=1
- export GOARM=6
- export GOOS=linux
# - go test -v -race `go list ./... | grep -v /vendor/`

# - go get -v -d github.com/docker/swarm
# - echo "get dependencies"
# - git clone -b v1.10.0 https://github.com/docker/docker /drone/src/github.com/docker/docker
# - go get -v -d ./...
- echo "start building"
- CGO_ENABLED=0 ${GOPATH}/bin/godep go install -v -a -tags netgo -installsuffix netgo -ldflags '-extldflags "-static" -s' .
- CGO_ENABLED=0 ${GOPATH}/bin/godep go build -v -a -tags netgo -installsuffix netgo -ldflags '-extldflags "-static" -s' .
- echo -e "#####\ncreate tar and checksum\n#####"
- mkdir -p /drone/src/github.com/hypriot/rpi-swarm/content/
- cp ${GOPATH}/bin/swarm /drone/src/github.com/hypriot/rpi-swarm/content/
# - cp ${GOPATH}/bin/swarm /drone/src/github.com/hypriot/rpi-swarm/content/
- ls -lah ${GOPATH}/src/github.com/docker/swarm/
- cp ${GOPATH}/src/github.com/docker/swarm/swarm /drone/src/github.com/hypriot/rpi-swarm/content/
- chmod a+x /drone/src/github.com/hypriot/rpi-swarm/content/swarm
- cp --parents /etc/ssl/certs/ca-certificates.crt /drone/src/github.com/hypriot/rpi-swarm/content/
- basename `git rev-parse --show-toplevel`
Expand All @@ -34,6 +48,7 @@ build:
- mkdir -p ${IMAGE_DIR}
- ln -s ${IMAGE_DIR} /drone/src/buildresult/latest


publish:
docker:
# environment:
Expand All @@ -43,8 +58,8 @@ publish:
email: $$DOCKER_EMAIL
repo: hypriot/rpi-swarm
tag:
- 1.2.0
- latest
- 1.2.1
# - latest
save:
file: /drone/src/buildresult/latest/swarm.tar

Expand Down

0 comments on commit 1a9ce0e

Please sign in to comment.