Use hugo in Travis CI pipeline (#10606)

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
pull/11105/head
Takuya N 2018-11-19 11:41:58 +09:00 committed by k8s-ci-robot
parent b82bf96203
commit 51c602d017
1 changed files with 27 additions and 14 deletions

View File

@ -2,20 +2,33 @@ language: go
go: go:
- 1.10.2 - 1.10.2
# Don't want default ./... here: env:
install: - HUGO_VERSION=0.49
- export PATH=$GOPATH/bin:$PATH
- mkdir -p $HOME/gopath/src/k8s.io
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/website && cd $HOME/gopath/src/k8s.io/website
# Make sure we are testing against the correct branch jobs:
- pushd $GOPATH/src/k8s.io && git clone https://github.com/kubernetes/kubernetes && popd include:
- pushd $GOPATH/src/k8s.io/kubernetes && git checkout release-1.11 && popd - name: "Testing examples"
- cp -L -R $GOPATH/src/k8s.io/kubernetes/vendor/ $GOPATH/src/ # Don't want default ./... here:
- rm -r $GOPATH/src/k8s.io/kubernetes/vendor/ install:
- export PATH=$GOPATH/bin:$PATH
- mkdir -p $HOME/gopath/src/k8s.io
- mv $TRAVIS_BUILD_DIR $HOME/gopath/src/k8s.io/website && cd $HOME/gopath/src/k8s.io/website
# Fetch additional dependencies to run the tests in examples/examples_test.go # Make sure we are testing against the correct branch
- go get -t -v k8s.io/website/content/en/examples - pushd $GOPATH/src/k8s.io && git clone https://github.com/kubernetes/kubernetes && popd
- pushd $GOPATH/src/k8s.io/kubernetes && git checkout release-1.11 && popd
- cp -L -R $GOPATH/src/k8s.io/kubernetes/vendor/ $GOPATH/src/
- rm -r $GOPATH/src/k8s.io/kubernetes/vendor/
script: # Fetch additional dependencies to run the tests in examples/examples_test.go
- go test -v k8s.io/website/content/en/examples - go get -t -v k8s.io/website/content/en/examples
script:
- go test -v k8s.io/website/content/en/examples
- name: "Hugo build"
install:
- curl -L https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_linux-64bit.tar.gz | tar -xz
- mkdir -p ${TRAVIS_HOME}/bin
- mv hugo ${TRAVIS_HOME}/bin
- export PATH=${TRAVIS_HOME}/bin:$PATH
script:
- hugo