hook up linter

This commit is contained in:
Brad Rydzewski
2019-10-16 23:47:18 -07:00
parent 47c1f5248a
commit 241df7a44b
30 changed files with 724 additions and 24 deletions

View File

@@ -0,0 +1,24 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: golang
commands:
- go build
- go test
---
kind: pipeline
name: default
steps:
- name: build
image: golang
commands:
- go build
- go test
...

View File

@@ -0,0 +1,17 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: build
image: golang
commands:
- go build
- go test
- name: build
image: golang
commands:
- go build
- go test

View File

@@ -0,0 +1,15 @@
---
kind: pipeline
type: docker
name: default
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: test
image: redis

15
engine/linter/testdata/invalid_arch.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
---
kind: pipeline
type: docker
name: linux
platform:
os: linux
arch: s390x
steps:
- name: build
image: golang
commands:
- go build
- go test

14
engine/linter/testdata/invalid_os.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
---
kind: pipeline
type: docker
name: linux
platform:
os: openbsd
steps:
- name: build
image: golang
commands:
- go build
- go test

View File

@@ -0,0 +1,9 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
build: {}

35
engine/linter/testdata/missing_dep.yml vendored Normal file
View File

@@ -0,0 +1,35 @@
---
kind: pipeline
type: docker
name: amd64
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: database
image: redis
ports:
- 6379
---
kind: pipeline
name: arm
platform:
arch: arm
steps:
- name: test
image: golang
commands:
- go build
- go test
depends_on:
- foo
...

View File

@@ -0,0 +1,10 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
commands:
- go build
- go test

10
engine/linter/testdata/missing_name.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
---
kind: pipeline
type: docker
name: linux
steps:
- image: golang
commands:
- go build
- go test

View File

@@ -0,0 +1,20 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
devices:
- name: data
path: /dev/xvda
services:
- name: database
image: redis
ports:
- 6379

13
engine/linter/testdata/pipeline_dns.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
dns:
- 8.8.8.8

View File

@@ -0,0 +1,14 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
dns_search:
- dc1.example.com
- dc2.example.com

View File

@@ -0,0 +1,14 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
extra_hosts:
- "somehost:162.242.195.82"
- "otherhost:50.31.209.229"

View File

@@ -0,0 +1,12 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
network_mode: host

View File

@@ -0,0 +1,18 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: database
image: redis
detach: true
ports:
- port: 6379
host: 6379
- name: test
image: golang
commands:
- go build
- go test

View File

@@ -0,0 +1,18 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
privileged: true
services:
- name: database
image: redis
ports:
- 6379

View File

@@ -0,0 +1,14 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: docker
volumes:
- name: _docker_socket
path: /var/run/docker.sock
commands:
- docker system prune

View File

@@ -0,0 +1,20 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: database
image: redis
ports:
- 6379
devices:
- name: data
path: /dev/xvda

View File

@@ -0,0 +1,18 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: database
image: redis
ports:
- port: 6379
host: 6379

39
engine/linter/testdata/simple.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
---
kind: pipeline
type: docker
name: amd64
steps:
- name: build
image: golang
commands:
- go build
- name: test
image: golang
commands:
- go test
services:
- name: database
image: redis
ports:
- 6379
---
kind: pipeline
name: arm
platform:
arch: arm
steps:
- name: test
image: golang
commands:
- go build
- go test
depends_on:
- amd64
...

View File

@@ -0,0 +1,21 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: database
image: redis
ports:
- 6379
volumes:
- name: vol
temp: {}

View File

@@ -0,0 +1,22 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: database
image: redis
ports:
- 6379
volumes:
- name: vol
temp:
medium: memory

View File

@@ -0,0 +1,22 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: database
image: redis
ports:
- 6379
volumes:
- name: vol
host:
path: /any/path/it/will/be/replaced

View File

@@ -0,0 +1,21 @@
---
kind: pipeline
type: docker
name: linux
steps:
- name: test
image: golang
commands:
- go build
- go test
services:
- name: database
image: redis
ports:
- 6379
volumes:
- name: _workspace
temp: {}