From e9a63473a0fa1e026d75194c3e6f4d175e802de8 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Wed, 3 May 2017 09:11:52 -0700 Subject: [PATCH 1/3] scripts,travis: install 'marker' for CI tests Signed-off-by: Gyu-Ho Lee --- .travis.yml | 1 + scripts/install-marker.sh | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100755 scripts/install-marker.sh diff --git a/.travis.yml b/.travis.yml index fa92d463a22..7585788d8de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,6 +46,7 @@ before_install: - go get -v -u honnef.co/go/tools/cmd/gosimple - go get -v -u honnef.co/go/tools/cmd/unused - go get -v -u honnef.co/go/tools/cmd/staticcheck + - ./scripts/install-marker.sh amd64 # disable godep restore override install: diff --git a/scripts/install-marker.sh b/scripts/install-marker.sh new file mode 100755 index 00000000000..0cca4017df1 --- /dev/null +++ b/scripts/install-marker.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash + +set -e + +ARCH=$1 + +if [ -z "$1" ]; then + echo "Usage: ${0} [amd64 or darwin], defaulting to 'amd64'" >> /dev/stderr + ARCH=amd64 +fi + +MARKER_URL=https://storage.googleapis.com/etcd/test-binaries/marker-v0.4.0-x86_64-unknown-linux-gnu +if [ ${ARCH} == "darwin" ]; then + MARKER_URL=https://storage.googleapis.com/etcd/test-binaries/marker-v0.4.0-x86_64-apple-darwin +fi + +echo "Installing marker" +curl -L ${MARKER_URL} -o ${GOPATH}/bin/marker +chmod 755 ${GOPATH}/bin/marker + +${GOPATH}/bin/marker --version From c2959c998fb011e10c97375ea36a03f32d7fa177 Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Wed, 3 May 2017 09:16:57 -0700 Subject: [PATCH 2/3] test: run 'marker' to find broken links Signed-off-by: Gyu-Ho Lee --- test | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test b/test index 5284cbdb765..dd471699ff8 100755 --- a/test +++ b/test @@ -233,6 +233,18 @@ function fmt_pass { exit 255 fi + # TODO: check other markdown files when marker handles headers with '[]' + if which marker >/dev/null; then + echo "Checking marker to find broken links..." + markerResult=`marker --skip-http --root ./Documentation 2>&1 || true` + if [ -n "${markerResult}" ]; then + echo -e "marker checking failed:\n${markerResult}" + exit 255 + fi + else + echo "Skipping marker..." + fi + if which goword >/dev/null; then echo "Checking goword..." # get all go files to process From 282c6fd17d629599012f43c735c8d50ae2bccabf Mon Sep 17 00:00:00 2001 From: Gyu-Ho Lee Date: Wed, 3 May 2017 17:07:47 -0700 Subject: [PATCH 3/3] Documentation: remove '[]' from '[DEPRECATED]' To make 'marker' pass the tests Signed-off-by: Gyu-Ho Lee --- Documentation/op-guide/configuration.md | 10 ++++++++-- Documentation/v2/configuration.md | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Documentation/op-guide/configuration.md b/Documentation/op-guide/configuration.md index 338bd3e33d8..8dadd317917 100644 --- a/Documentation/op-guide/configuration.md +++ b/Documentation/op-guide/configuration.md @@ -185,7 +185,10 @@ To start etcd automatically using custom settings at startup in Linux, using a [ The security flags help to [build a secure etcd cluster][security]. -### --ca-file [DEPRECATED] +### --ca-file + +**DEPRECATED** + + Path to the client server TLS CA file. `--ca-file ca.crt` could be replaced by `--trusted-ca-file ca.crt --client-cert-auth` and etcd will perform the same. + default: none + env variable: ETCD_CA_FILE @@ -215,7 +218,10 @@ The security flags help to [build a secure etcd cluster][security]. + default: false + env variable: ETCD_AUTO_TLS -### --peer-ca-file [DEPRECATED] +### --peer-ca-file + +**DEPRECATED** + + Path to the peer server TLS CA file. `--peer-ca-file ca.crt` could be replaced by `--peer-trusted-ca-file ca.crt --peer-client-cert-auth` and etcd will perform the same. + default: none + env variable: ETCD_PEER_CA_FILE diff --git a/Documentation/v2/configuration.md b/Documentation/v2/configuration.md index bab27d71ac8..3960c7962bc 100644 --- a/Documentation/v2/configuration.md +++ b/Documentation/v2/configuration.md @@ -176,7 +176,10 @@ To start etcd automatically using custom settings at startup in Linux, using a [ The security flags help to [build a secure etcd cluster][security]. -### --ca-file [DEPRECATED] +### --ca-file + +**DEPRECATED** + + Path to the client server TLS CA file. `--ca-file ca.crt` could be replaced by `--trusted-ca-file ca.crt --client-cert-auth` and etcd will perform the same. + default: none + env variable: ETCD_CA_FILE @@ -201,7 +204,10 @@ The security flags help to [build a secure etcd cluster][security]. + default: none + env variable: ETCD_TRUSTED_CA_FILE -### --peer-ca-file [DEPRECATED] +### --peer-ca-file + +**DEPRECATED** + + Path to the peer server TLS CA file. `--peer-ca-file ca.crt` could be replaced by `--peer-trusted-ca-file ca.crt --peer-client-cert-auth` and etcd will perform the same. + default: none + env variable: ETCD_PEER_CA_FILE