Skip to content

Commit ae4cb7c

Browse files
committed
Use hugo in Travis CI pipeline
Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
1 parent abcee2d commit ae4cb7c

File tree

1 file changed

+25
-14
lines changed

1 file changed

+25
-14
lines changed

.travis.yml

+25-14
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,31 @@ language: go
22
go:
33
- 1.10.2
44

5-
# Don't want default ./... here:
6-
install:
7-
- export PATH=$GOPATH/bin:$PATH
8-
- mkdir -p $HOME/gopath/src/k8s.io
9-
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/website && cd $HOME/gopath/src/k8s.io/website
5+
env:
6+
- HUGO_VERSION=0.49
107

11-
# Make sure we are testing against the correct branch
12-
- pushd $GOPATH/src/k8s.io && git clone https://github.com/kubernetes/kubernetes && popd
13-
- pushd $GOPATH/src/k8s.io/kubernetes && git checkout release-1.11 && popd
14-
- cp -L -R $GOPATH/src/k8s.io/kubernetes/vendor/ $GOPATH/src/
15-
- rm -r $GOPATH/src/k8s.io/kubernetes/vendor/
8+
jobs:
9+
include:
10+
# Don't want default ./... here:
11+
- install:
12+
- export PATH=$GOPATH/bin:$PATH
13+
- mkdir -p $HOME/gopath/src/k8s.io
14+
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/website && cd $HOME/gopath/src/k8s.io/website
1615

17-
# Fetch additional dependencies to run the tests in examples/examples_test.go
18-
- go get -t -v k8s.io/website/content/en/examples
16+
# Make sure we are testing against the correct branch
17+
- pushd $GOPATH/src/k8s.io && git clone https://github.com/kubernetes/kubernetes && popd
18+
- pushd $GOPATH/src/k8s.io/kubernetes && git checkout release-1.11 && popd
19+
- cp -L -R $GOPATH/src/k8s.io/kubernetes/vendor/ $GOPATH/src/
20+
- rm -r $GOPATH/src/k8s.io/kubernetes/vendor/
1921

20-
script:
21-
- go test -v k8s.io/website/content/en/examples
22+
# Fetch additional dependencies to run the tests in examples/examples_test.go
23+
- go get -t -v k8s.io/website/content/en/examples
24+
script:
25+
- go test -v k8s.io/website/content/en/examples
26+
- install:
27+
- curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-64bit.tar.gz | tar -xz
28+
- mkdir -p ${TRAVIS_HOME}/bin
29+
- mv hugo ${TRAVIS_HOME}/bin
30+
- export PATH=${TRAVIS_HOME}/bin:$PATH
31+
script:
32+
- hugo

0 commit comments

Comments
 (0)