forked from openshift/installer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
39 lines (39 loc) · 1.57 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
sudo: required
language: bash
services:
- docker
env:
global:
- BAZEL_IMG="quay.io/coreos/tectonic-builder:bazel-v0.3"
branches:
only:
- master
jobs:
include:
- stage: Lint & Test
# Terraform lint
script: docker run -v $(pwd):/data -t quay.io/coreos/tflint
# YAML lint
- script: >
docker run -t -v $(pwd):/workdir
quay.io/coreos/yamllint --config-data
'{extends: default, rules: {line-length: {level: warning, max: 120}}}'
./examples/ ./installer/
# shellcheck
- script: >
docker run -v $(pwd):/workdir:ro
--entrypoint sh quay.io/coreos/shellcheck-alpine:v0.5.0
-c 'for file in $(find /workdir/ -type f -name "*.sh"); do
if ! shellcheck --format=gcc $file; then export FAILED=true; fi; done;
if [ "$FAILED" != "" ]; then exit 1; fi'
# Go vet
- script: "docker run -v $PWD:/go/src/github.com/openshift/installer -w /go/src/github.com/openshift/installer quay.io/coreos/golang-testing go vet ./installer/..."
# Go lint
- script: "docker run -v $PWD:$PWD -w $PWD quay.io/coreos/golang-testing golint -set_exit_status installer/..."
# Terraform tests
- script: "chmod 0777 $PWD && docker run -v $PWD:$PWD:rw -w $PWD $BAZEL_IMG bazel test terraform_fmt --test_output=all"
# Installer unit tests
- script: "chmod 0777 $PWD && docker run -v $PWD:$PWD:rw -w $PWD $BAZEL_IMG bazel test installer:cli_units --test_output=all"
- stage: Build
script: "chmod 0777 $PWD && docker run -v $PWD:$PWD:rw -w $PWD $BAZEL_IMG bazel build tarball"