Makefile 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393
  1. # run from repository root
  2. #
  3. # Example:
  4. # make clean -f ./hack/scripts-dev/Makefile
  5. # make build -f ./hack/scripts-dev/Makefile
  6. .PHONY: build
  7. build:
  8. GO_BUILD_FLAGS="-v" ./build
  9. ./bin/etcd --version
  10. ETCDCTL_API=3 ./bin/etcdctl version
  11. clean:
  12. rm -f ./codecov
  13. rm -rf ./agent-*
  14. rm -rf ./covdir
  15. rm -f ./*.log
  16. rm -f ./bin/Dockerfile-release
  17. rm -rf ./bin/*.etcd
  18. rm -rf ./gopath
  19. rm -rf ./release
  20. rm -f ./integration/127.0.0.1:* ./integration/localhost:*
  21. rm -f ./clientv3/integration/127.0.0.1:* ./clientv3/integration/localhost:*
  22. rm -f ./clientv3/ordering/127.0.0.1:* ./clientv3/ordering/localhost:*
  23. _GO_VERSION = 1.9.2
  24. ifdef GO_VERSION
  25. _GO_VERSION = $(GO_VERSION)
  26. endif
  27. # Example:
  28. # GO_VERSION=1.8.5 make build-docker-test -f ./hack/scripts-dev/Makefile
  29. # make build-docker-test -f ./hack/scripts-dev/Makefile
  30. # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
  31. # GO_VERSION=1.8.5 make push-docker-test -f ./hack/scripts-dev/Makefile
  32. # make push-docker-test -f ./hack/scripts-dev/Makefile
  33. # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
  34. # GO_VERSION=1.8.5 make pull-docker-test -f ./hack/scripts-dev/Makefile
  35. # make pull-docker-test -f ./hack/scripts-dev/Makefile
  36. build-docker-test:
  37. $(info GO_VERSION: $(_GO_VERSION))
  38. @cat ./Dockerfile-test | sed s/REPLACE_ME_GO_VERSION/$(_GO_VERSION)/ \
  39. > ./.Dockerfile-test
  40. docker build \
  41. --tag gcr.io/etcd-development/etcd-test:go$(_GO_VERSION) \
  42. --file ./.Dockerfile-test .
  43. push-docker-test:
  44. $(info GO_VERSION: $(_GO_VERSION))
  45. gcloud docker -- push gcr.io/etcd-development/etcd-test:go$(_GO_VERSION)
  46. pull-docker-test:
  47. $(info GO_VERSION: $(_GO_VERSION))
  48. docker pull gcr.io/etcd-development/etcd-test:go$(_GO_VERSION)
  49. # Example:
  50. # make build-docker-test -f ./hack/scripts-dev/Makefile
  51. # make compile-with-docker-test -f ./hack/scripts-dev/Makefile
  52. compile-with-docker-test:
  53. $(info GO_VERSION: $(_GO_VERSION))
  54. docker run \
  55. --rm \
  56. --mount type=bind,source=`pwd`,destination=/etcd \
  57. gcr.io/etcd-development/etcd-test:go$(_GO_VERSION) \
  58. /bin/bash -c "cd /etcd && GO_BUILD_FLAGS=-v ./build && ./bin/etcd --version"
  59. # Local machine:
  60. # TEST_OPTS="PASSES='fmt'" make test -f ./hack/scripts-dev/Makefile
  61. # TEST_OPTS="PASSES='fmt bom dep compile build unit'" make test -f ./hack/scripts-dev/Makefile
  62. # TEST_OPTS="RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional'" make test -f ./hack/scripts-dev/Makefile
  63. # TEST_OPTS="PASSES='build grpcproxy'" make test -f ./hack/scripts-dev/Makefile
  64. #
  65. # Example (test with docker):
  66. # make pull-docker-test -f ./hack/scripts-dev/Makefile
  67. # TEST_OPTS="PASSES='fmt'" make docker-test -f ./hack/scripts-dev/Makefile
  68. # TEST_OPTS="VERBOSE=2 PASSES='unit'" make docker-test -f ./hack/scripts-dev/Makefile
  69. #
  70. # Travis CI (test with docker):
  71. # TEST_OPTS="PASSES='fmt bom dep compile build unit'" make docker-test -f ./hack/scripts-dev/Makefile
  72. #
  73. # Semaphore CI (test with docker):
  74. # TEST_OPTS="RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional'" make docker-test -f ./hack/scripts-dev/Makefile
  75. # HOST_TMP_DI=/tmp TEST_OPTS="RELEASE_TEST=y INTEGRATION=y PASSES='build unit release integration_e2e functional'" make docker-test -f ./hack/scripts-dev/Makefile
  76. # TEST_OPTS="GOARCH=386 PASSES='build unit integration_e2e'" make docker-test -f ./hack/scripts-dev/Makefile
  77. #
  78. # grpc-proxy tests (test with docker):
  79. # TEST_OPTS="PASSES='build grpcproxy'" make docker-test -f ./hack/scripts-dev/Makefile
  80. # HOST_TMP_DI=/tmp TEST_OPTS="PASSES='build grpcproxy'" make docker-test -f ./hack/scripts-dev/Makefile
  81. TEST_SUFFIX = $(shell date +%s | base64 | head -c 15)
  82. _TEST_OPTS = PASSES='unit'
  83. ifdef TEST_OPTS
  84. _TEST_OPTS = $(TEST_OPTS)
  85. endif
  86. _TMP_DIR_MOUNT_FLAG = --mount type=tmpfs,destination=/tmp
  87. ifdef HOST_TMP_DIR
  88. _TMP_DIR_MOUNT_FLAG = --mount type=bind,source=$(HOST_TMP_DIR),destination=/tmp
  89. endif
  90. .PHONY: test
  91. test:
  92. $(info TEST_OPTS: $(_TEST_OPTS))
  93. $(info log-file: test-$(TEST_SUFFIX).log)
  94. $(_TEST_OPTS) ./test 2>&1 | tee test-$(TEST_SUFFIX).log
  95. ! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 test-$(TEST_SUFFIX).log
  96. docker-test:
  97. $(info GO_VERSION: $(_GO_VERSION))
  98. $(info TEST_OPTS: $(_TEST_OPTS))
  99. $(info log-file: test-$(TEST_SUFFIX).log)
  100. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  101. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  102. docker run \
  103. --rm \
  104. $(_TMP_DIR_MOUNT_FLAG) \
  105. --mount type=bind,source=`pwd`,destination=/go/src/github.com/coreos/etcd \
  106. gcr.io/etcd-development/etcd-test:go$(_GO_VERSION) \
  107. /bin/bash -c "$(_TEST_OPTS) ./test 2>&1 | tee test-$(TEST_SUFFIX).log"
  108. ! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 test-$(TEST_SUFFIX).log
  109. docker-test-coverage:
  110. $(info GO_VERSION: $(_GO_VERSION))
  111. $(info log-file: docker-test-coverage-$(TEST_SUFFIX).log)
  112. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  113. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  114. docker run \
  115. --rm \
  116. $(_TMP_DIR_MOUNT_FLAG) \
  117. --mount type=bind,source=`pwd`,destination=/go/src/github.com/coreos/etcd \
  118. gcr.io/etcd-development/etcd-test:go$(_GO_VERSION) \
  119. /bin/bash -c "COVERDIR=covdir PASSES='build build_cov cov' ./test 2>&1 | tee docker-test-coverage-$(TEST_SUFFIX).log && /codecov -t 6040de41-c073-4d6f-bbf8-d89256ef31e1"
  120. ! egrep "(--- FAIL:|panic: test timed out|appears to have leaked)" -B50 -A10 docker-test-coverage-$(TEST_SUFFIX).log
  121. # build release container image with Linux
  122. _ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound")
  123. ifdef ETCD_VERSION
  124. _ETCD_VERSION = $(ETCD_VERSION)
  125. endif
  126. # Example:
  127. # ETCD_VERSION=v3.3.0-test.0 make build-docker-release-master -f ./hack/scripts-dev/Makefile
  128. # ETCD_VERSION=v3.3.0-test.0 make push-docker-release-master -f ./hack/scripts-dev/Makefile
  129. # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
  130. build-docker-release-master: compile-with-docker-test
  131. $(info ETCD_VERSION: $(_ETCD_VERSION))
  132. cp ./Dockerfile-release ./bin/Dockerfile-release
  133. docker build \
  134. --tag gcr.io/etcd-development/etcd:$(_ETCD_VERSION) \
  135. --file ./bin/Dockerfile-release \
  136. ./bin
  137. rm -f ./bin/Dockerfile-release
  138. docker run \
  139. --rm \
  140. gcr.io/etcd-development/etcd:$(_ETCD_VERSION) \
  141. /bin/sh -c "/usr/local/bin/etcd --version && ETCDCTL_API=3 /usr/local/bin/etcdctl version"
  142. push-docker-release-master:
  143. $(info ETCD_VERSION: $(_ETCD_VERSION))
  144. gcloud docker -- push gcr.io/etcd-development/etcd:$(_ETCD_VERSION)
  145. # Example:
  146. # make build-docker-test -f ./hack/scripts-dev/Makefile
  147. # make compile-with-docker-test -f ./hack/scripts-dev/Makefile
  148. # make build-docker-static-ip-test -f ./hack/scripts-dev/Makefile
  149. # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
  150. # make push-docker-static-ip-test -f ./hack/scripts-dev/Makefile
  151. # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
  152. # make pull-docker-static-ip-test -f ./hack/scripts-dev/Makefile
  153. # make docker-static-ip-test-certs-run -f ./hack/scripts-dev/Makefile
  154. # make docker-static-ip-test-certs-metrics-proxy-run -f ./hack/scripts-dev/Makefile
  155. build-docker-static-ip-test:
  156. $(info GO_VERSION: $(_GO_VERSION))
  157. @cat ./hack/scripts-dev/docker-static-ip/Dockerfile | sed s/REPLACE_ME_GO_VERSION/$(_GO_VERSION)/ \
  158. > ./hack/scripts-dev/docker-static-ip/.Dockerfile
  159. docker build \
  160. --tag gcr.io/etcd-development/etcd-static-ip-test:go$(_GO_VERSION) \
  161. --file ./hack/scripts-dev/docker-static-ip/.Dockerfile \
  162. ./hack/scripts-dev/docker-static-ip
  163. push-docker-static-ip-test:
  164. $(info GO_VERSION: $(_GO_VERSION))
  165. gcloud docker -- push gcr.io/etcd-development/etcd-static-ip-test:go$(_GO_VERSION)
  166. pull-docker-static-ip-test:
  167. $(info GO_VERSION: $(_GO_VERSION))
  168. docker pull gcr.io/etcd-development/etcd-static-ip-test:go$(_GO_VERSION)
  169. docker-static-ip-test-certs-run:
  170. $(info GO_VERSION: $(_GO_VERSION))
  171. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  172. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  173. docker run \
  174. --rm \
  175. --tty \
  176. $(_TMP_DIR_MOUNT_FLAG) \
  177. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  178. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-static-ip/certs,destination=/certs \
  179. gcr.io/etcd-development/etcd-static-ip-test:go$(_GO_VERSION) \
  180. /bin/bash -c "cd /etcd && /certs/run.sh && rm -rf m*.etcd"
  181. docker-static-ip-test-certs-metrics-proxy-run:
  182. $(info GO_VERSION: $(_GO_VERSION))
  183. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  184. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  185. docker run \
  186. --rm \
  187. --tty \
  188. $(_TMP_DIR_MOUNT_FLAG) \
  189. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  190. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-static-ip/certs-metrics-proxy,destination=/certs-metrics-proxy \
  191. gcr.io/etcd-development/etcd-static-ip-test:go$(_GO_VERSION) \
  192. /bin/bash -c "cd /etcd && /certs-metrics-proxy/run.sh && rm -rf m*.etcd"
  193. # Example:
  194. # make build-docker-test -f ./hack/scripts-dev/Makefile
  195. # make compile-with-docker-test -f ./hack/scripts-dev/Makefile
  196. # make build-docker-dns-test -f ./hack/scripts-dev/Makefile
  197. # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
  198. # make push-docker-dns-test -f ./hack/scripts-dev/Makefile
  199. # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
  200. # make pull-docker-dns-test -f ./hack/scripts-dev/Makefile
  201. # make docker-dns-test-certs-run -f ./hack/scripts-dev/Makefile
  202. # make docker-dns-test-certs-gateway-run -f ./hack/scripts-dev/Makefile
  203. # make docker-dns-test-certs-wildcard-run -f ./hack/scripts-dev/Makefile
  204. build-docker-dns-test:
  205. $(info GO_VERSION: $(_GO_VERSION))
  206. @cat ./hack/scripts-dev/docker-dns/Dockerfile | sed s/REPLACE_ME_GO_VERSION/$(_GO_VERSION)/ \
  207. > ./hack/scripts-dev/docker-dns/.Dockerfile
  208. docker build \
  209. --tag gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \
  210. --file ./hack/scripts-dev/docker-dns/.Dockerfile \
  211. ./hack/scripts-dev/docker-dns
  212. docker run \
  213. --rm \
  214. --dns 127.0.0.1 \
  215. gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \
  216. /bin/bash -c "/etc/init.d/bind9 start && cat /dev/null >/etc/hosts && dig etcd.local"
  217. push-docker-dns-test:
  218. $(info GO_VERSION: $(_GO_VERSION))
  219. gcloud docker -- push gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION)
  220. pull-docker-dns-test:
  221. $(info GO_VERSION: $(_GO_VERSION))
  222. docker pull gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION)
  223. docker-dns-test-certs-run:
  224. $(info GO_VERSION: $(_GO_VERSION))
  225. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  226. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  227. docker run \
  228. --rm \
  229. --tty \
  230. --dns 127.0.0.1 \
  231. $(_TMP_DIR_MOUNT_FLAG) \
  232. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  233. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns/certs,destination=/certs \
  234. gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \
  235. /bin/bash -c "cd /etcd && /certs/run.sh && rm -rf m*.etcd"
  236. docker-dns-test-certs-gateway-run:
  237. $(info GO_VERSION: $(_GO_VERSION))
  238. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  239. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  240. docker run \
  241. --rm \
  242. --tty \
  243. --dns 127.0.0.1 \
  244. $(_TMP_DIR_MOUNT_FLAG) \
  245. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  246. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns/certs-gateway,destination=/certs-gateway \
  247. gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \
  248. /bin/bash -c "cd /etcd && /certs-gateway/run.sh && rm -rf m*.etcd"
  249. docker-dns-test-certs-wildcard-run:
  250. $(info GO_VERSION: $(_GO_VERSION))
  251. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  252. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  253. docker run \
  254. --rm \
  255. --tty \
  256. --dns 127.0.0.1 \
  257. $(_TMP_DIR_MOUNT_FLAG) \
  258. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  259. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns/certs-wildcard,destination=/certs-wildcard \
  260. gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \
  261. /bin/bash -c "cd /etcd && /certs-wildcard/run.sh && rm -rf m*.etcd"
  262. # Example:
  263. # make build-docker-test -f ./hack/scripts-dev/Makefile
  264. # make compile-with-docker-test -f ./hack/scripts-dev/Makefile
  265. # make build-docker-dns-srv-test -f ./hack/scripts-dev/Makefile
  266. # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io
  267. # make push-docker-dns-srv-test -f ./hack/scripts-dev/Makefile
  268. # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com
  269. # make pull-docker-dns-srv-test -f ./hack/scripts-dev/Makefile
  270. # make docker-dns-srv-test-certs-run -f ./hack/scripts-dev/Makefile
  271. # make docker-dns-srv-test-certs-gateway-run -f ./hack/scripts-dev/Makefile
  272. # make docker-dns-srv-test-certs-wildcard-run -f ./hack/scripts-dev/Makefile
  273. build-docker-dns-srv-test:
  274. $(info GO_VERSION: $(_GO_VERSION))
  275. @cat ./hack/scripts-dev/docker-dns-srv/Dockerfile | sed s/REPLACE_ME_GO_VERSION/$(_GO_VERSION)/ \
  276. > ./hack/scripts-dev/docker-dns-srv/.Dockerfile
  277. docker build \
  278. --tag gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION) \
  279. --file ./hack/scripts-dev/docker-dns-srv/.Dockerfile \
  280. ./hack/scripts-dev/docker-dns-srv
  281. docker run \
  282. --rm \
  283. --dns 127.0.0.1 \
  284. gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION) \
  285. /bin/bash -c "/etc/init.d/bind9 start && cat /dev/null >/etc/hosts && dig +noall +answer SRV _etcd-client-ssl._tcp.etcd.local && dig +noall +answer SRV _etcd-server-ssl._tcp.etcd.local && dig +noall +answer m1.etcd.local m2.etcd.local m3.etcd.local"
  286. push-docker-dns-srv-test:
  287. $(info GO_VERSION: $(_GO_VERSION))
  288. gcloud docker -- push gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION)
  289. pull-docker-dns-srv-test:
  290. $(info GO_VERSION: $(_GO_VERSION))
  291. docker pull gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION)
  292. docker-dns-srv-test-certs-run:
  293. $(info GO_VERSION: $(_GO_VERSION))
  294. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  295. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  296. docker run \
  297. --rm \
  298. --tty \
  299. --dns 127.0.0.1 \
  300. $(_TMP_DIR_MOUNT_FLAG) \
  301. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  302. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns-srv/certs,destination=/certs \
  303. gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION) \
  304. /bin/bash -c "cd /etcd && /certs/run.sh && rm -rf m*.etcd"
  305. docker-dns-srv-test-certs-gateway-run:
  306. $(info GO_VERSION: $(_GO_VERSION))
  307. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  308. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  309. docker run \
  310. --rm \
  311. --tty \
  312. --dns 127.0.0.1 \
  313. $(_TMP_DIR_MOUNT_FLAG) \
  314. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  315. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns-srv/certs-gateway,destination=/certs-gateway \
  316. gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION) \
  317. /bin/bash -c "cd /etcd && /certs-gateway/run.sh && rm -rf m*.etcd"
  318. docker-dns-srv-test-certs-wildcard-run:
  319. $(info GO_VERSION: $(_GO_VERSION))
  320. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  321. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  322. docker run \
  323. --rm \
  324. --tty \
  325. --dns 127.0.0.1 \
  326. $(_TMP_DIR_MOUNT_FLAG) \
  327. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  328. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns-srv/certs-wildcard,destination=/certs-wildcard \
  329. gcr.io/etcd-development/etcd-dns-srv-test:go$(_GO_VERSION) \
  330. /bin/bash -c "cd /etcd && /certs-wildcard/run.sh && rm -rf m*.etcd"
  331. # example workflow for common name + auth
  332. # TODO: make this as tests
  333. # make docker-dns-example-certs-common-name-run -f ./hack/scripts-dev/Makefile
  334. docker-dns-example-certs-common-name-run:
  335. $(info GO_VERSION: $(_GO_VERSION))
  336. $(info HOST_TMP_DIR: $(HOST_TMP_DIR))
  337. $(info TMP_DIR_MOUNT_FLAG: $(_TMP_DIR_MOUNT_FLAG))
  338. docker run \
  339. --rm \
  340. --tty \
  341. --dns 127.0.0.1 \
  342. $(_TMP_DIR_MOUNT_FLAG) \
  343. --mount type=bind,source=`pwd`/bin,destination=/etcd \
  344. --mount type=bind,source=`pwd`/hack/scripts-dev/docker-dns/certs-common-name,destination=/certs-common-name \
  345. gcr.io/etcd-development/etcd-dns-test:go$(_GO_VERSION) \
  346. /bin/bash -c "cd /etcd && /certs-common-name/run.sh && rm -rf m*.etcd"