go.etcd.io/etcd@v3.3.27+incompatible/Makefile (about) 1 # run from repository root 2 3 4 5 # Example: 6 # make build 7 # make clean 8 # make docker-clean 9 # make docker-start 10 # make docker-kill 11 # make docker-remove 12 13 .PHONY: build 14 build: 15 GO_BUILD_FLAGS="-v" ./build 16 ./bin/etcd --version 17 ETCDCTL_API=3 ./bin/etcdctl version 18 19 clean: 20 rm -f ./codecov 21 rm -rf ./agent-* 22 rm -rf ./covdir 23 rm -f ./*.coverprofile 24 rm -f ./*.log 25 rm -f ./bin/Dockerfile-release 26 rm -rf ./bin/*.etcd 27 rm -rf ./default.etcd 28 rm -rf ./tests/e2e/default.etcd 29 rm -rf ./gopath 30 rm -rf ./gopath.proto 31 rm -rf ./release 32 rm -f ./snapshot/localhost:* 33 rm -f ./integration/127.0.0.1:* ./integration/localhost:* 34 rm -f ./clientv3/integration/127.0.0.1:* ./clientv3/integration/localhost:* 35 rm -f ./clientv3/ordering/127.0.0.1:* ./clientv3/ordering/localhost:* 36 37 docker-clean: 38 docker images 39 docker image prune --force 40 41 docker-start: 42 service docker restart 43 44 docker-kill: 45 docker kill `docker ps -q` || true 46 47 docker-remove: 48 docker rm --force `docker ps -a -q` || true 49 docker rmi --force `docker images -q` || true 50 51 52 53 GO_VERSION ?= 1.12.9 54 ETCD_VERSION ?= $(shell git rev-parse --short HEAD || echo "GitNotFound") 55 56 TEST_SUFFIX = $(shell date +%s | base64 | head -c 15) 57 TEST_OPTS ?= PASSES='unit' 58 59 TMP_DIR_MOUNT_FLAG = --mount type=tmpfs,destination=/tmp 60 ifdef HOST_TMP_DIR 61 TMP_DIR_MOUNT_FLAG = --mount type=bind,source=$(HOST_TMP_DIR),destination=/tmp 62 endif 63 64 65 66 # Example: 67 # GO_VERSION=1.12.9 make build-docker-test 68 # make build-docker-test 69 # 70 # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io 71 # GO_VERSION=1.12.9 make push-docker-test 72 # make push-docker-test 73 # 74 # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com 75 # make pull-docker-test 76 77 build-docker-test: 78 $(info GO_VERSION: $(GO_VERSION)) 79 @sed -i.bak 's|REPLACE_ME_GO_VERSION|$(GO_VERSION)|g' ./tests/Dockerfile 80 docker build \ 81 --tag gcr.io/etcd-development/etcd-test:go$(GO_VERSION)-release-3.3 \ 82 --file ./tests/Dockerfile . 83 @mv ./tests/Dockerfile.bak ./tests/Dockerfile 84 85 push-docker-test: 86 $(info GO_VERSION: $(GO_VERSION)) 87 gcloud docker -- push gcr.io/etcd-development/etcd-test:go$(GO_VERSION)-release-3.3 88 89 pull-docker-test: 90 $(info GO_VERSION: $(GO_VERSION)) 91 docker pull gcr.io/etcd-development/etcd-test:go$(GO_VERSION)-release-3.3 92 93 94 95 # Example: 96 # make build-docker-test 97 # make compile-with-docker-test 98 # make compile-setup-gopath-with-docker-test 99 100 compile-with-docker-test: 101 $(info GO_VERSION: $(GO_VERSION)) 102 docker run \ 103 --rm \ 104 --mount type=bind,source=`pwd`,destination=/go/src/github.com/coreos/etcd \ 105 gcr.io/etcd-development/etcd-test:go$(GO_VERSION)-release-3.3 \ 106 /bin/bash -c "GO_BUILD_FLAGS=-v GOOS=linux GOARCH=amd64 ./build && ./bin/etcd --version" 107 108 compile-setup-gopath-with-docker-test: 109 $(info GO_VERSION: $(GO_VERSION)) 110 docker run \ 111 --rm \ 112 --mount type=bind,source=`pwd`,destination=/etcd \ 113 gcr.io/etcd-development/etcd-test:go$(GO_VERSION)-release-3.3 \ 114 /bin/bash -c "cd /etcd && ETCD_SETUP_GOPATH=1 GO_BUILD_FLAGS=-v GOOS=linux GOARCH=amd64 ./build && ./bin/etcd --version && rm -rf ./gopath" 115 116 117 118 # Example: 119 # 120 # Local machine: 121 # TEST_OPTS="PASSES='fmt'" make test 122 # TEST_OPTS="PASSES='fmt bom dep build unit'" make test 123 # TEST_OPTS="PASSES='build unit release integration_e2e functional'" make test 124 # TEST_OPTS="PASSES='build grpcproxy'" make test 125 # 126 # Example (test with docker): 127 # make pull-docker-test 128 # TEST_OPTS="PASSES='fmt'" make docker-test 129 # TEST_OPTS="VERBOSE=2 PASSES='unit'" make docker-test 130 # 131 # Travis CI (test with docker): 132 # TEST_OPTS="PASSES='fmt bom dep build unit'" make docker-test 133 # 134 # Semaphore CI (test with docker): 135 # TEST_OPTS="PASSES='build unit release integration_e2e functional'" make docker-test 136 # HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build unit release integration_e2e functional'" make docker-test 137 # TEST_OPTS="GOARCH=386 PASSES='build unit integration_e2e'" make docker-test 138 # 139 # grpc-proxy tests (test with docker): 140 # TEST_OPTS="PASSES='build grpcproxy'" make docker-test 141 # HOST_TMP_DIR=/tmp TEST_OPTS="PASSES='build grpcproxy'" make docker-test 142 143 .PHONY: test 144 test: 145 $(info TEST_OPTS: $(TEST_OPTS)) 146 $(info log-file: test-$(TEST_SUFFIX).log) 147 $(TEST_OPTS) ./test 2>&1 | tee test-$(TEST_SUFFIX).log 148 ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test-$(TEST_SUFFIX).log 149 150 docker-test: 151 $(info GO_VERSION: $(GO_VERSION)) 152 $(info ETCD_VERSION: $(ETCD_VERSION)) 153 $(info TEST_OPTS: $(TEST_OPTS)) 154 $(info log-file: test-$(TEST_SUFFIX).log) 155 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 156 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 157 docker run \ 158 --rm \ 159 $(TMP_DIR_MOUNT_FLAG) \ 160 --mount type=bind,source=`pwd`,destination=/go/src/github.com/coreos/etcd \ 161 gcr.io/etcd-development/etcd-test:go$(GO_VERSION)-release-3.3 \ 162 /bin/bash -c "$(TEST_OPTS) ./test 2>&1 | tee test-$(TEST_SUFFIX).log" 163 ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 test-$(TEST_SUFFIX).log 164 165 docker-test-coverage: 166 $(info GO_VERSION: $(GO_VERSION)) 167 $(info ETCD_VERSION: $(ETCD_VERSION)) 168 $(info log-file: docker-test-coverage-$(TEST_SUFFIX).log) 169 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 170 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 171 docker run \ 172 --rm \ 173 $(TMP_DIR_MOUNT_FLAG) \ 174 --mount type=bind,source=`pwd`,destination=/go/src/github.com/coreos/etcd \ 175 gcr.io/etcd-development/etcd-test:go$(GO_VERSION)-release-3.3 \ 176 /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" 177 ! egrep "(--- FAIL:|DATA RACE|panic: test timed out|appears to have leaked)" -B50 -A10 docker-test-coverage-$(TEST_SUFFIX).log 178 179 180 181 # Example: 182 # make compile-with-docker-test 183 # ETCD_VERSION=v3-test make build-docker-release-master 184 # ETCD_VERSION=v3-test make push-docker-release-master 185 # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com 186 187 build-docker-release-master: 188 $(info ETCD_VERSION: $(ETCD_VERSION)) 189 cp ./Dockerfile-release ./bin/Dockerfile-release 190 docker build \ 191 --tag gcr.io/etcd-development/etcd:$(ETCD_VERSION) \ 192 --file ./bin/Dockerfile-release \ 193 ./bin 194 rm -f ./bin/Dockerfile-release 195 196 docker run \ 197 --rm \ 198 gcr.io/etcd-development/etcd:$(ETCD_VERSION) \ 199 /bin/sh -c "/usr/local/bin/etcd --version && ETCDCTL_API=3 /usr/local/bin/etcdctl version" 200 201 push-docker-release-master: 202 $(info ETCD_VERSION: $(ETCD_VERSION)) 203 gcloud docker -- push gcr.io/etcd-development/etcd:$(ETCD_VERSION) 204 205 206 207 # Example: 208 # make build-docker-test 209 # make compile-with-docker-test 210 # make build-docker-static-ip-test 211 # 212 # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io 213 # make push-docker-static-ip-test 214 # 215 # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com 216 # make pull-docker-static-ip-test 217 # 218 # make docker-static-ip-test-certs-run 219 # make docker-static-ip-test-certs-metrics-proxy-run 220 221 build-docker-static-ip-test: 222 $(info GO_VERSION: $(GO_VERSION)) 223 @sed -i.bak 's|REPLACE_ME_GO_VERSION|$(GO_VERSION)|g' ./tests/docker-static-ip/Dockerfile 224 docker build \ 225 --tag gcr.io/etcd-development/etcd-static-ip-test:go$(GO_VERSION) \ 226 --file ./tests/docker-static-ip/Dockerfile \ 227 ./tests/docker-static-ip 228 @mv ./tests/docker-static-ip/Dockerfile.bak ./tests/docker-static-ip/Dockerfile 229 230 push-docker-static-ip-test: 231 $(info GO_VERSION: $(GO_VERSION)) 232 gcloud docker -- push gcr.io/etcd-development/etcd-static-ip-test:go$(GO_VERSION) 233 234 pull-docker-static-ip-test: 235 $(info GO_VERSION: $(GO_VERSION)) 236 docker pull gcr.io/etcd-development/etcd-static-ip-test:go$(GO_VERSION) 237 238 docker-static-ip-test-certs-run: 239 $(info GO_VERSION: $(GO_VERSION)) 240 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 241 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 242 docker run \ 243 --rm \ 244 --tty \ 245 $(TMP_DIR_MOUNT_FLAG) \ 246 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 247 --mount type=bind,source=`pwd`/tests/docker-static-ip/certs,destination=/certs \ 248 gcr.io/etcd-development/etcd-static-ip-test:go$(GO_VERSION) \ 249 /bin/bash -c "cd /etcd && /certs/run.sh && rm -rf m*.etcd" 250 251 docker-static-ip-test-certs-metrics-proxy-run: 252 $(info GO_VERSION: $(GO_VERSION)) 253 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 254 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 255 docker run \ 256 --rm \ 257 --tty \ 258 $(TMP_DIR_MOUNT_FLAG) \ 259 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 260 --mount type=bind,source=`pwd`/tests/docker-static-ip/certs-metrics-proxy,destination=/certs-metrics-proxy \ 261 gcr.io/etcd-development/etcd-static-ip-test:go$(GO_VERSION) \ 262 /bin/bash -c "cd /etcd && /certs-metrics-proxy/run.sh && rm -rf m*.etcd" 263 264 265 266 # Example: 267 # make build-docker-test 268 # make compile-with-docker-test 269 # make build-docker-dns-test 270 # 271 # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io 272 # make push-docker-dns-test 273 # 274 # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com 275 # make pull-docker-dns-test 276 # 277 # make docker-dns-test-insecure-run 278 # make docker-dns-test-certs-run 279 # make docker-dns-test-certs-gateway-run 280 # make docker-dns-test-certs-wildcard-run 281 # make docker-dns-test-certs-common-name-auth-run 282 # make docker-dns-test-certs-common-name-multi-run 283 284 build-docker-dns-test: 285 $(info GO_VERSION: $(GO_VERSION)) 286 @sed -i.bak 's|REPLACE_ME_GO_VERSION|$(GO_VERSION)|g' ./tests/docker-dns/Dockerfile 287 docker build \ 288 --tag gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 289 --file ./tests/docker-dns/Dockerfile \ 290 ./tests/docker-dns 291 @mv ./tests/docker-dns/Dockerfile.bak ./tests/docker-dns/Dockerfile 292 293 docker run \ 294 --rm \ 295 --dns 127.0.0.1 \ 296 gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 297 /bin/bash -c "/etc/init.d/bind9 start && cat /dev/null >/etc/hosts && dig etcd.local" 298 299 push-docker-dns-test: 300 $(info GO_VERSION: $(GO_VERSION)) 301 gcloud docker -- push gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) 302 303 pull-docker-dns-test: 304 $(info GO_VERSION: $(GO_VERSION)) 305 docker pull gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) 306 307 docker-dns-test-insecure-run: 308 $(info GO_VERSION: $(GO_VERSION)) 309 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 310 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 311 docker run \ 312 --rm \ 313 --tty \ 314 --dns 127.0.0.1 \ 315 $(TMP_DIR_MOUNT_FLAG) \ 316 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 317 --mount type=bind,source=`pwd`/tests/docker-dns/insecure,destination=/insecure \ 318 gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 319 /bin/bash -c "cd /etcd && /insecure/run.sh && rm -rf m*.etcd" 320 321 docker-dns-test-certs-run: 322 $(info GO_VERSION: $(GO_VERSION)) 323 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 324 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 325 docker run \ 326 --rm \ 327 --tty \ 328 --dns 127.0.0.1 \ 329 $(TMP_DIR_MOUNT_FLAG) \ 330 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 331 --mount type=bind,source=`pwd`/tests/docker-dns/certs,destination=/certs \ 332 gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 333 /bin/bash -c "cd /etcd && /certs/run.sh && rm -rf m*.etcd" 334 335 docker-dns-test-certs-gateway-run: 336 $(info GO_VERSION: $(GO_VERSION)) 337 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 338 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 339 docker run \ 340 --rm \ 341 --tty \ 342 --dns 127.0.0.1 \ 343 $(TMP_DIR_MOUNT_FLAG) \ 344 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 345 --mount type=bind,source=`pwd`/tests/docker-dns/certs-gateway,destination=/certs-gateway \ 346 gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 347 /bin/bash -c "cd /etcd && /certs-gateway/run.sh && rm -rf m*.etcd" 348 349 docker-dns-test-certs-wildcard-run: 350 $(info GO_VERSION: $(GO_VERSION)) 351 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 352 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 353 docker run \ 354 --rm \ 355 --tty \ 356 --dns 127.0.0.1 \ 357 $(TMP_DIR_MOUNT_FLAG) \ 358 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 359 --mount type=bind,source=`pwd`/tests/docker-dns/certs-wildcard,destination=/certs-wildcard \ 360 gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 361 /bin/bash -c "cd /etcd && /certs-wildcard/run.sh && rm -rf m*.etcd" 362 363 docker-dns-test-certs-common-name-auth-run: 364 $(info GO_VERSION: $(GO_VERSION)) 365 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 366 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 367 docker run \ 368 --rm \ 369 --tty \ 370 --dns 127.0.0.1 \ 371 $(TMP_DIR_MOUNT_FLAG) \ 372 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 373 --mount type=bind,source=`pwd`/tests/docker-dns/certs-common-name-auth,destination=/certs-common-name-auth \ 374 gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 375 /bin/bash -c "cd /etcd && /certs-common-name-auth/run.sh && rm -rf m*.etcd" 376 377 docker-dns-test-certs-common-name-multi-run: 378 $(info GO_VERSION: $(GO_VERSION)) 379 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 380 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 381 docker run \ 382 --rm \ 383 --tty \ 384 --dns 127.0.0.1 \ 385 $(TMP_DIR_MOUNT_FLAG) \ 386 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 387 --mount type=bind,source=`pwd`/tests/docker-dns/certs-common-name-multi,destination=/certs-common-name-multi \ 388 gcr.io/etcd-development/etcd-dns-test:go$(GO_VERSION) \ 389 /bin/bash -c "cd /etcd && /certs-common-name-multi/run.sh && rm -rf m*.etcd" 390 391 392 393 # Example: 394 # make build-docker-test 395 # make compile-with-docker-test 396 # make build-docker-dns-srv-test 397 # gcloud docker -- login -u _json_key -p "$(cat /etc/gcp-key-etcd-development.json)" https://gcr.io 398 # make push-docker-dns-srv-test 399 # gsutil -m acl ch -u allUsers:R -r gs://artifacts.etcd-development.appspot.com 400 # make pull-docker-dns-srv-test 401 # make docker-dns-srv-test-certs-run 402 # make docker-dns-srv-test-certs-gateway-run 403 # make docker-dns-srv-test-certs-wildcard-run 404 405 build-docker-dns-srv-test: 406 $(info GO_VERSION: $(GO_VERSION)) 407 @sed -i.bak 's|REPLACE_ME_GO_VERSION|$(GO_VERSION)|g' ./tests/docker-dns-srv/Dockerfile 408 docker build \ 409 --tag gcr.io/etcd-development/etcd-dns-srv-test:go$(GO_VERSION) \ 410 --file ./tests/docker-dns-srv/Dockerfile \ 411 ./tests/docker-dns-srv 412 @mv ./tests/docker-dns-srv/Dockerfile.bak ./tests/docker-dns-srv/Dockerfile 413 414 docker run \ 415 --rm \ 416 --dns 127.0.0.1 \ 417 gcr.io/etcd-development/etcd-dns-srv-test:go$(GO_VERSION) \ 418 /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" 419 420 push-docker-dns-srv-test: 421 $(info GO_VERSION: $(GO_VERSION)) 422 gcloud docker -- push gcr.io/etcd-development/etcd-dns-srv-test:go$(GO_VERSION) 423 424 pull-docker-dns-srv-test: 425 $(info GO_VERSION: $(GO_VERSION)) 426 docker pull gcr.io/etcd-development/etcd-dns-srv-test:go$(GO_VERSION) 427 428 docker-dns-srv-test-certs-run: 429 $(info GO_VERSION: $(GO_VERSION)) 430 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 431 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 432 docker run \ 433 --rm \ 434 --tty \ 435 --dns 127.0.0.1 \ 436 $(TMP_DIR_MOUNT_FLAG) \ 437 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 438 --mount type=bind,source=`pwd`/tests/docker-dns-srv/certs,destination=/certs \ 439 gcr.io/etcd-development/etcd-dns-srv-test:go$(GO_VERSION) \ 440 /bin/bash -c "cd /etcd && /certs/run.sh && rm -rf m*.etcd" 441 442 docker-dns-srv-test-certs-gateway-run: 443 $(info GO_VERSION: $(GO_VERSION)) 444 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 445 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 446 docker run \ 447 --rm \ 448 --tty \ 449 --dns 127.0.0.1 \ 450 $(TMP_DIR_MOUNT_FLAG) \ 451 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 452 --mount type=bind,source=`pwd`/tests/docker-dns-srv/certs-gateway,destination=/certs-gateway \ 453 gcr.io/etcd-development/etcd-dns-srv-test:go$(GO_VERSION) \ 454 /bin/bash -c "cd /etcd && /certs-gateway/run.sh && rm -rf m*.etcd" 455 456 docker-dns-srv-test-certs-wildcard-run: 457 $(info GO_VERSION: $(GO_VERSION)) 458 $(info HOST_TMP_DIR: $(HOST_TMP_DIR)) 459 $(info TMP_DIR_MOUNT_FLAG: $(TMP_DIR_MOUNT_FLAG)) 460 docker run \ 461 --rm \ 462 --tty \ 463 --dns 127.0.0.1 \ 464 $(TMP_DIR_MOUNT_FLAG) \ 465 --mount type=bind,source=`pwd`/bin,destination=/etcd \ 466 --mount type=bind,source=`pwd`/tests/docker-dns-srv/certs-wildcard,destination=/certs-wildcard \ 467 gcr.io/etcd-development/etcd-dns-srv-test:go$(GO_VERSION) \ 468 /bin/bash -c "cd /etcd && /certs-wildcard/run.sh && rm -rf m*.etcd" 469 470 471 472 # Example: 473 # make build-functional 474 # make build-docker-functional 475 # make push-docker-functional 476 # make pull-docker-functional 477 478 build-functional: 479 $(info GO_VERSION: $(GO_VERSION)) 480 $(info ETCD_VERSION: $(ETCD_VERSION)) 481 ./functional/build 482 ./bin/etcd-agent -help || true && \ 483 ./bin/etcd-proxy -help || true && \ 484 ./bin/etcd-runner --help || true && \ 485 ./bin/etcd-tester -help || true 486 487 build-docker-functional: 488 $(info GO_VERSION: $(GO_VERSION)) 489 $(info ETCD_VERSION: $(ETCD_VERSION)) 490 @sed -i.bak 's|REPLACE_ME_GO_VERSION|$(GO_VERSION)|g' ./functional/Dockerfile 491 docker build \ 492 --tag gcr.io/etcd-development/etcd-functional:go$(GO_VERSION) \ 493 --file ./functional/Dockerfile \ 494 . 495 @mv ./functional/Dockerfile.bak ./functional/Dockerfile 496 497 docker run \ 498 --rm \ 499 gcr.io/etcd-development/etcd-functional:go$(GO_VERSION) \ 500 /bin/bash -c "./bin/etcd --version && \ 501 ./bin/etcd-failpoints --version && \ 502 ETCDCTL_API=3 ./bin/etcdctl version && \ 503 ./bin/etcd-agent -help || true && \ 504 ./bin/etcd-proxy -help || true && \ 505 ./bin/etcd-runner --help || true && \ 506 ./bin/etcd-tester -help || true && \ 507 ./bin/benchmark --help || true" 508 509 push-docker-functional: 510 $(info GO_VERSION: $(GO_VERSION)) 511 $(info ETCD_VERSION: $(ETCD_VERSION)) 512 gcloud docker -- push gcr.io/etcd-development/etcd-functional:go$(GO_VERSION) 513 514 pull-docker-functional: 515 $(info GO_VERSION: $(GO_VERSION)) 516 $(info ETCD_VERSION: $(ETCD_VERSION)) 517 docker pull gcr.io/etcd-development/etcd-functional:go$(GO_VERSION)