Skip to content

Commit

Permalink
Merge pull request etcd-io#7864 from gyuho/doc-link-fixes
Browse files Browse the repository at this point in the history
*: run 'marker' in CI
  • Loading branch information
gyuho authored May 4, 2017
2 parents 2e32d21 + 282c6fd commit 505bf8c
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 8 additions & 2 deletions Documentation/op-guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions Documentation/v2/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
21 changes: 21 additions & 0 deletions scripts/install-marker.sh
Original file line number Diff line number Diff line change
@@ -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
12 changes: 12 additions & 0 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 505bf8c

Please sign in to comment.