1
0
mirror of https://github.com/tektoncd/catalog.git synced 2024-11-23 06:08:46 +00:00

Linting yamls with yamllint 🏷

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>
This commit is contained in:
Vincent Demeester 2019-11-08 17:23:24 +01:00 committed by tekton-robot
parent a2c1c09bfc
commit 5c2ab7d6c3
18 changed files with 100 additions and 67 deletions

35
.yamllint Normal file
View File

@ -0,0 +1,35 @@
ignore: |
/vendor
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

View File

@ -52,4 +52,3 @@ spec:
command: ["/usr/bin/tower-cli"]
args:
- "$(inputs.params.ARGS)"

View File

@ -17,9 +17,9 @@ spec:
stepTemplate:
envFrom:
- configMapRef:
name: argocd-env-configmap # used for server address
name: argocd-env-configmap # used for server address
- secretRef:
name: argocd-env-secret # used for authentication (username/password or auth token)
name: argocd-env-secret # used for authentication (username/password or auth token)
steps:
- name: login
image: argoproj/argocd:$(inputs.params.argocd-version)

View File

@ -1,3 +1,4 @@
---
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:

View File

@ -10,8 +10,8 @@ spec:
default: "Dockerfile"
- name: BUILDKIT_IMAGE
description: The name of the BuildKit image
# The image needs to be rootful because Tekton creates /builder/home/.docker/config.json owned by root:root with 0600
# https://github.com/tektoncd/pipeline/issues/852
# The image needs to be rootful because Tekton creates /builder/home/.docker/config.json owned by root:root with 0600
# https://github.com/tektoncd/pipeline/issues/852
default: "moby/buildkit:v0.6.2"
resources:
- name: source

View File

@ -38,7 +38,7 @@ spec:
readOnly: true
mountPath: /certs
volumes:
# buildkit-daemon-certs must contain ca.pem, cert.pem, and key.pem
# buildkit-daemon-certs must contain ca.pem, cert.pem, and key.pem
- name: certs
secret:
secretName: buildkit-daemon-certs

View File

@ -17,7 +17,7 @@ spec:
annotations:
container.apparmor.security.beta.kubernetes.io/buildkitd: unconfined
container.seccomp.security.alpha.kubernetes.io/buildkitd: unconfined
# see buildkit/docs/rootless.md for caveats of rootless mode
# see buildkit/docs/rootless.md for caveats of rootless mode
spec:
containers:
- name: buildkitd
@ -35,7 +35,7 @@ spec:
- /certs/key.pem
- --oci-worker-no-process-sandbox
securityContext:
# To change UID/GID, you need to rebuild the image
# To change UID/GID, you need to rebuild the image
runAsUser: 1000
runAsGroup: 1000
ports:
@ -45,7 +45,7 @@ spec:
readOnly: true
mountPath: /certs
volumes:
# buildkit-daemon-certs must contain ca.pem, cert.pem, and key.pem
# buildkit-daemon-certs must contain ca.pem, cert.pem, and key.pem
- name: certs
secret:
secretName: buildkit-daemon-certs

View File

@ -10,8 +10,8 @@ spec:
default: "Dockerfile"
- name: BUILDKIT_CLIENT_IMAGE
description: The name of the BuildKit client (buildctl) image
# The image needs to be rootful because Tekton creates /builder/home/.docker/config.json owned by root:root with 0600
# https://github.com/tektoncd/pipeline/issues/852
# The image needs to be rootful because Tekton creates /builder/home/.docker/config.json owned by root:root with 0600
# https://github.com/tektoncd/pipeline/issues/852
default: "moby/buildkit:v0.6.2"
- name: BUILDKIT_DAEMON_ADDRESS
description: The address of the BuildKit daemon (buildkitd) service

View File

@ -11,7 +11,7 @@ spec:
description: flags to use for the test command
default: --verbose
- name: version
default: golangci-lint version to use
description: golangci-lint version to use
default: "v1.17.1"
- name: GOOS
description: "running operating system target"

View File

@ -35,5 +35,5 @@ spec:
- /kaniko/executor
- $(inputs.params.EXTRA_ARGS)
- --dockerfile=$(inputs.params.DOCKERFILE)
- --context=/workspace/source/$(inputs.params.CONTEXT) # The user does not need to care the workspace and the source.
- --context=/workspace/source/$(inputs.params.CONTEXT) # The user does not need to care the workspace and the source.
- --destination=$(outputs.resources.image.url)

View File

@ -13,7 +13,7 @@ spec:
steps:
# the first step is required as knctl doesn't support inCluster configuration.
- name: kubeconfig
image: gcr.io/cloud-builders/kubectl # it is huge
image: gcr.io/cloud-builders/kubectl # it is huge
command: ["/bin/bash"]
args:
- -c

View File

@ -46,50 +46,49 @@ spec:
- name: add-ow-env-to-dockerfile
image: ubuntu
command:
- bash
- bash
args:
- -c
- |
if [ -z $(inputs.params.OW_PROJECT_URL) ]; then
OW_ACTION_CODE="$(inputs.params.OW_ACTION_CODE)"
- -c
- |
if [ -z $(inputs.params.OW_PROJECT_URL) ]; then
OW_ACTION_CODE="$(inputs.params.OW_ACTION_CODE)"
else
TEMPDIR="knative-"$((1 + RANDOM % 100))
TEMPFILE=`basename "$(inputs.params.OW_PROJECT_URL)"`
mkdir $TEMPDIR
cd $TEMPDIR
wget -O $TEMPFILE "$(inputs.params.OW_PROJECT_URL)"
if [ "$(inputs.params.OW_ACTION_BINARY)" = true ]; then
OW_ACTION_CODE=`base64 $TEMPFILE | tr -d '[:space:]'`
else
TEMPDIR="knative-"$((1 + RANDOM % 100))
TEMPFILE=`basename "$(inputs.params.OW_PROJECT_URL)"`
mkdir $TEMPDIR
cd $TEMPDIR
wget -O $TEMPFILE "$(inputs.params.OW_PROJECT_URL)"
if [ "$(inputs.params.OW_ACTION_BINARY)" = true ]; then
OW_ACTION_CODE=`base64 $TEMPFILE | tr -d '[:space:]'`
else
OW_ACTION_CODE=`cat $TEMPFILE`
fi
cd ..
OW_ACTION_CODE=`cat $TEMPFILE`
fi
cat <<EOF >> $(inputs.params.DOCKERFILE)
ENV __OW_RUNTIME_DEBUG "$(inputs.params.OW_RUNTIME_DEBUG)"
ENV __OW_RUNTIME_PLATFORM "$(inputs.params.OW_RUNTIME_PLATFORM)"
ENV __OW_ACTION_NAME "$(inputs.params.OW_ACTION_NAME)"
ENV __OW_ACTION_CODE "$(OW_ACTION_CODE)"
ENV __OW_ACTION_MAIN "$(inputs.params.OW_ACTION_MAIN)"
ENV __OW_ACTION_BINARY "$(inputs.params.OW_ACTION_BINARY)"
ENV __OW_HTTP_METHODS "$(inputs.params.OW_HTTP_METHODS)"
ENV __OW_ACTION_RAW "$(inputs.params.OW_ACTION_RAW)"
ENV __OW_PROJECT_URL "$(inputs.params.OW_PROJECT_URL)"
EOF
cd ..
fi
cat <<EOF >> $(inputs.params.DOCKERFILE)
ENV __OW_RUNTIME_DEBUG "$(inputs.params.OW_RUNTIME_DEBUG)"
ENV __OW_RUNTIME_PLATFORM "$(inputs.params.OW_RUNTIME_PLATFORM)"
ENV __OW_ACTION_NAME "$(inputs.params.OW_ACTION_NAME)"
ENV __OW_ACTION_CODE "$(OW_ACTION_CODE)"
ENV __OW_ACTION_MAIN "$(inputs.params.OW_ACTION_MAIN)"
ENV __OW_ACTION_BINARY "$(inputs.params.OW_ACTION_BINARY)"
ENV __OW_HTTP_METHODS "$(inputs.params.OW_HTTP_METHODS)"
ENV __OW_ACTION_RAW "$(inputs.params.OW_ACTION_RAW)"
ENV __OW_PROJECT_URL "$(inputs.params.OW_PROJECT_URL)"
EOF
- name: update-dockerfile-for-tekton
image: ubuntu
command:
- sed
- sed
args:
- -i
- -e
- 's/COPY ./COPY .\/runtime-git/g'
- $(inputs.params.DOCKERFILE)
- -i
- -e
- 's/COPY ./COPY .\/runtime-git/g'
- $(inputs.params.DOCKERFILE)
- name: build-openwhisk-nodejs-runtime
image: "gcr.io/kaniko-project/executor:latest"
command:
- /kaniko/executor
- /kaniko/executor
args:
- --dockerfile=$(inputs.params.DOCKERFILE)
- --destination=$(outputs.resources.runtime-image.url)
- --dockerfile=$(inputs.params.DOCKERFILE)
- --destination=$(outputs.resources.runtime-image.url)

View File

@ -2,7 +2,6 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: openwhisk-runtime-builder
name: openwhisk-runtime-builder
secrets:
- name: dockerhub-user-pass
- name: dockerhub-user-pass

View File

@ -5,8 +5,8 @@ metadata:
spec:
inputs:
resources:
- name: source
type: git
- name: source
type: git
params:
- name: BUILDER_IMAGE
description: The location of the s2i builder image.
@ -28,8 +28,8 @@ spec:
workingdir: /workspace/source
command: ['s2i', 'build', '$(inputs.params.PATH_CONTEXT)', '$(inputs.params.BUILDER_IMAGE)', '--as-dockerfile', '/gen-source/Dockerfile.gen']
volumeMounts:
- name: gen-source
mountPath: /gen-source
- name: gen-source
mountPath: /gen-source
- name: build
image: quay.io/buildah/stable
workingdir: /gen-source