diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml new file mode 100644 index 0000000..f5dbdd4 --- /dev/null +++ b/.azure-pipelines.yml @@ -0,0 +1,46 @@ +pool: + vmImage: 'Ubuntu-16.04' + +variables: + GOROOT: '/usr/local/go1.11' # Go installation path + GO111MODULE: on + HUGO_VERSION: 0.53 + HUGO_SHA: 0e4424c90ce5c7a0c0f7ad24a558dd0c2f1500256023f6e3c0004f57a20ee119 + +steps: +- script: | + echo '##vso[task.prependpath]$(GOROOT)/bin' + displayName: 'Prepare Go Environment' + +- script: | + go version + go get -v . + workingDirectory: 'src' + displayName: 'Get Go Webserver Dependencies' + +- script: | + go version + go build -v . + workingDirectory: 'src' + displayName: 'Build Go Webserver' + +- script: | + go version + go test + workingDirectory: 'src' + displayName: 'Execute Go Webserver Tests' + +- script: | + mkdir hugobin + wget -O ${HUGO_VERSION}.tar.gz https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.tar.gz + echo "${HUGO_SHA} ${HUGO_VERSION}.tar.gz" | sha256sum -c + tar xf ${HUGO_VERSION}.tar.gz --directory=hugobin hugo + rm -r ${HUGO_VERSION}.tar.gz + hugobin/hugo version + displayName: 'Prepare Hugo Environment' + +- script: | + ../hugobin/hugo version + ../hugobin/hugo + displayName: 'Build Hugo Website' + workingDirectory: 'hugo'