-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
34 lines (31 loc) · 1002 Bytes
/
.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
# Use container-based infrastructure for quicker build start-up
sudo: false
# Define stages
stages:
- markdownlint
- dockerlint
jobs:
include:
- stage: markdownlint
language: node_js
node_js:
- '8'
install:
- npm install -g markdownlint-cli
script:
- find . -type f -name '*.md' | xargs markdownlint -
- stage: dockerlint
# Environment data
env:
# Path to 'hadolint' binary
HADOLINT: "${HOME}/hadolint"
# Use generic image to cut start-up time
language: generic
install:
# Download hadolint binary and set it as executable
- curl -sL -o ${HADOLINT} "https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-$(uname -s)-$(uname -m)"
&& chmod 700 ${HADOLINT}
script:
# List files which name starts with 'Dockerfile'
# eg. Dockerfile, Dockerfile.build, etc.
- git ls-files --exclude='Dockerfile*' --ignored | xargs --max-lines=1 ${HADOLINT}