Skip to content

Commit

Permalink
Linting yamls with yamllint 🏷
Browse files Browse the repository at this point in the history
Next update of plumbing will enable `yamllint` check, so this make
sure we have linted yaml before 👼

Signed-off-by: Vincent Demeester <vdemeest@redhat.com>
  • Loading branch information
vdemeester authored and tekton-robot committed Nov 8, 2019
1 parent 50cf4bc commit 76e5d8b
Show file tree
Hide file tree
Showing 13 changed files with 99 additions and 67 deletions.
36 changes: 36 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
ignore: |
/vendor
test/**/*-chart/**

rules:
braces: enable
brackets: enable
colons: enable
commas: enable
comments:
level: warning
comments-indentation:
level: warning
document-end: disable
document-start: disable
empty-lines: enable
empty-values: enable
hyphens: enable
key-duplicates: enable
key-ordering: disable
line-length: disable
new-line-at-end-of-file: disable
new-lines: enable
octal-values: enable
quoted-strings: disable
trailing-spaces: enable
truthy:
level: warning

# accept both key:
# - item
#
# and key:
# - item
indentation:
indent-sequences: whatever
19 changes: 8 additions & 11 deletions config/config-artifact-bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ kind: ConfigMap
metadata:
name: config-artifact-bucket
namespace: tekton-pipelines
data:
# location of the gcs bucket to be used for artifact storage
# location: "gs://bucket-name"

# name of the secret that will contain the credentials for the service account
# with access to the bucket
# bucket.service.account.secret.name:

# The key in the secret with the required service account json
# bucket.service.account.secret.key:

# data:
# # location of the gcs bucket to be used for artifact storage
# location: "gs://bucket-name"
# # name of the secret that will contain the credentials for the service account
# # with access to the bucket
# bucket.service.account.secret.name:
# # The key in the secret with the required service account json
# bucket.service.account.secret.key:
12 changes: 6 additions & 6 deletions config/config-artifact-pvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ kind: ConfigMap
metadata:
name: config-artifact-pvc
namespace: tekton-pipelines
data:
# size of the PVC volume
# size: 5Gi

# storage class of the PVC volume
# storageClassName: storage-class-name
# data:
# # size of the PVC volume
# size: 5Gi
#
# # storage class of the PVC volume
# storageClassName: storage-class-name
6 changes: 3 additions & 3 deletions examples/pipelineruns/output-pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
- name: read-docs-old
image: ubuntu
command: ["/bin/bash"]
args: ['-c', 'ls -la /workspace/damnworkspace/docs/README.md'] # tests that targetpath works
args: ['-c', 'ls -la /workspace/damnworkspace/docs/README.md'] # tests that targetpath works
- name: write-new-stuff
image: ubuntu
command: ['bash']
Expand All @@ -53,9 +53,9 @@ spec:
- name: read
image: ubuntu
command: ["/bin/bash"]
args: ['$(inputs.params.args)'] # tests that new targetpath and previous task output is dumped
args: ['$(inputs.params.args)'] # tests that new targetpath and previous task output is dumped
---
#The Output of the first Task (git resource) create-file is given as an `Input`
# The Output of the first Task (git resource) create-file is given as an `Input`
# to the next `Task` check-stuff-file-exists using`from` clause.

apiVersion: tekton.dev/v1alpha1
Expand Down
2 changes: 1 addition & 1 deletion examples/pipelineruns/pipelinerun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ spec:
- --destination=$(outputs.resources.builtImage.url)
- --context=$(inputs.params.pathToContext)
---
#This task deploys with kubectl apply -f <filename>
# This task deploys with kubectl apply -f <filename>
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
Expand Down
2 changes: 1 addition & 1 deletion examples/taskruns/build-push-kaniko.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
- name: url
value: https://github.com/GoogleContainerTools/skaffold
---
#Builds an image via kaniko and pushes it to registry.
# Builds an image via kaniko and pushes it to registry.
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
Expand Down
2 changes: 1 addition & 1 deletion examples/taskruns/git-volume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:

volumes:
- name: source
gitRepo: # https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo
gitRepo: # https://kubernetes.io/docs/concepts/storage/volumes/#gitrepo
# gitRepo is deprecated.
repository: "https://github.com/bazelbuild/rules_docker.git"
revision: "3caddbe7f75fde6afb2e2c63654b5bbeeeedf2ac"
2 changes: 1 addition & 1 deletion examples/taskruns/pull-private-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ secrets:
imagePullSecrets:
- name: test-readonly-credentials
---
#This example contains embedded taskSpec. This taskrun requires the secrets and service accounts to be able to pull the
# This example contains embedded taskSpec. This taskrun requires the secrets and service accounts to be able to pull the
# private image. Required secret and service account for this run is configured in test-build-robot SA and test-readonly-credentials secret.
apiVersion: tekton.dev/v1alpha1
kind: TaskRun
Expand Down
4 changes: 2 additions & 2 deletions examples/taskruns/task-multiple-output-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
type: image
params:
- name: url
value: gcr.io/dlorenc-vmtest2/leeroy-web # Replace this URL with $KO_DOCKER_REPO
value: gcr.io/dlorenc-vmtest2/leeroy-web # Replace this URL with $KO_DOCKER_REPO
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -16,7 +16,7 @@ spec:
type: image
params:
- name: url
value: gcr.io/christiewilson-catfactory/leeroy-web # Replace this URL with $KO_DOCKER_REPO
value: gcr.io/christiewilson-catfactory/leeroy-web # Replace this URL with $KO_DOCKER_REPO
---
# This demo modifies the cluster (deploys to it) you must use a service
# account with permission to admin the cluster (or make your default user an admin
Expand Down
2 changes: 1 addition & 1 deletion examples/taskruns/task-output-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
type: image
params:
- name: url
value: gcr.io/christiewilson-catfactory/leeroy-web # Replace this URL with $KO_DOCKER_REPO
value: gcr.io/christiewilson-catfactory/leeroy-web # Replace this URL with $KO_DOCKER_REPO
---
# This demo modifies the cluster (deploys to it) you must use a service
# account with permission to admin the cluster (or make your default user an admin
Expand Down
3 changes: 1 addition & 2 deletions tekton/ci-images.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

---
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
Expand Down Expand Up @@ -38,7 +38,6 @@ spec:
secret:
secretName: release-secret
---

apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
Expand Down
2 changes: 1 addition & 1 deletion tekton/release-pipeline-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ spec:
- name: builtGcsFetcherImage
type: image
- name: notification
type: cloudEvent
type: cloudEvent
tasks:
- name: lint
taskRef:
Expand Down
74 changes: 37 additions & 37 deletions tekton/resources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
- name: url
value: https://github.com/tektoncd/pipeline
- name: revision
value: vX.Y.Z-invalid-tags-boouuhhh # REPLACE with the commit you want to release
value: vX.Y.Z-invalid-tags-boouuhhh # REPLACE with the commit you want to release
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -17,12 +17,12 @@ metadata:
spec:
type: storage
params:
- name: type
value: gcs
- name: location
value: gs://tekton-releases/pipeline
- name: dir
value: "y"
- name: type
value: gcs
- name: location
value: gs://tekton-releases/pipeline
- name: dir
value: "y"
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -31,12 +31,12 @@ metadata:
spec:
type: storage
params:
- name: type
value: gcs
- name: location
value: gs://tekton-releases-nightly
- name: dir
value: "y"
- name: type
value: gcs
- name: location
value: gs://tekton-releases-nightly
- name: dir
value: "y"
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -45,8 +45,8 @@ metadata:
spec:
type: image
params:
- name: url
value: ko-ci # Registry is provided via parameter, this is a hack see #569
- name: url
value: ko-ci # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -55,8 +55,8 @@ metadata:
spec:
type: image
params:
- name: url
value: build-base # Registry is provided via parameter, this is a hack see #569
- name: url
value: build-base # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -65,8 +65,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/entrypoint # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/entrypoint # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -75,8 +75,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/kubeconfigwriter # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/kubeconfigwriter # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -85,8 +85,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/creds-init # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/creds-init # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -95,8 +95,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/git-init # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/git-init # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -105,8 +105,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/controller # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/controller # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -115,8 +115,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/webhook # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/webhook # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -125,8 +125,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/imagedigestexporter # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/imagedigestexporter # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -135,8 +135,8 @@ metadata:
spec:
type: image
params:
- name: url
value: cmd/pullrequest-init # Registry is provided via parameter, this is a hack see #569
- name: url
value: cmd/pullrequest-init # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -145,8 +145,8 @@ metadata:
spec:
type: image
params:
- name: url
value: vendor/github.com/googlecloudplatform/cloud-builders/gcs-fetcher/cmd/gcs-fetcher # Registry is provided via parameter, this is a hack see #569
- name: url
value: vendor/github.com/googlecloudplatform/cloud-builders/gcs-fetcher/cmd/gcs-fetcher # Registry is provided via parameter, this is a hack see #569
---
apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
Expand All @@ -155,5 +155,5 @@ metadata:
spec:
type: cloudEvent
params:
- name: targetURI
value: http://post-release-trigger-sink # This has to be changed to a valid URL
- name: targetURI
value: http://post-release-trigger-sink # This has to be changed to a valid URL

0 comments on commit 76e5d8b

Please sign in to comment.