Skip to content

Commit

Permalink
Fix yaml lint errors and warnings
Browse files Browse the repository at this point in the history
Issue: tektoncd#387

Signed-off-by: Puneet Punamiya <[email protected]>
  • Loading branch information
PuneetPunamiya authored and tekton-robot committed Jun 25, 2020
1 parent c827a5f commit 29a74cb
Show file tree
Hide file tree
Showing 27 changed files with 114 additions and 118 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
blank_issues_enabled: false
contact_links:
- name: Tekton Community Resources
- name: Tekton Community Resources
url: https://github.com/tektoncd/community/blob/master/contact.md
about: Reach out here to see what we're up to
- name: Tekton Slack Workspace
Expand Down
2 changes: 1 addition & 1 deletion aws-cli/aws-cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ spec:
image: amazon/aws-cli:latest
script: "$(params.SCRIPT)"
args:
- "$(params.ARGS)"
- "$(params.ARGS)"
2 changes: 1 addition & 1 deletion aws-cli/example/secret.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: Secret
metadata:
name: aws-credentials
type: Opaque
stringData:
stringData:
credentials: |-
[$(profile-name)]
aws_access_key_id = $(aws_access_key_id)
Expand Down
2 changes: 1 addition & 1 deletion buildid/examples/build-service-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
params:
- name: build-id
description: ID of the current build
type: string
type: string
steps:
- name: display-buildid
image: bash:latest
Expand Down
4 changes: 2 additions & 2 deletions buildid/examples/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ spec:
- name: get-build-id
taskRef:
name: generate-build-id
params:
params:
- name: base-version
value: $(params.service-version)
value: $(params.service-version)
- name: build-api
taskRef:
name: build-service-api
Expand Down
30 changes: 15 additions & 15 deletions curl/curl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ metadata:
name: curl
spec:
params:
- name: url
description: URL to curl'ed
type: string
- name: options
description: options of url
type: array
default: []
- name: curl-image
description: option of curl image
type: string
default: "curlimages/curl"
- name: url
description: URL to curl'ed
type: string
- name: options
description: options of url
type: array
default: []
- name: curl-image
description: option of curl image
type: string
default: "curlimages/curl"
steps:
- name: curl
image: "$(params.curl-image)"
command: [curl]
args: ["$(params.options[*])", "$(params.url)"]
- name: curl
image: "$(params.curl-image)"
command: [curl]
args: ["$(params.options[*])", "$(params.url)"]
2 changes: 1 addition & 1 deletion curl/tests/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
value: "www.google.com"
- name: options
value:
- "-i"
- "-i"
taskRef:
name: curl
---
Expand Down
59 changes: 29 additions & 30 deletions gcs/gcs-generic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ kind: Task
metadata:
name: gcs-generic
spec:
workspaces:
- name: credentials
description: A secret with a service account key to use as GOOGLE_APPLICATION_CREDENTIALS.
params:
- name: command
description: The command line that you would like to enter.
type: string
- name: options
description: The extended command line that you would like to enter.
type: array
- name: serviceAccountPath
description: |
workspaces:
- name: credentials
description: A secret with a service account key to use as GOOGLE_APPLICATION_CREDENTIALS.
params:
- name: command
description: The command line that you would like to enter.
type: string
- name: options
description: The extended command line that you would like to enter.
type: array
- name: serviceAccountPath
description: |
The path inside the credentials workspace to the GOOGLE_APPLICATION_CREDENTIALS key file.
type: string
default: service_account.json
- name: image
description: google cloud image that will be used in steps.
type: string
default: google/cloud-sdk
steps:
- name: credential-setup
image: "$(params.image)"
script: |
#!/usr/bin/env bash
set -xe
type: string
default: service_account.json
- name: image
description: google cloud image that will be used in steps.
type: string
default: google/cloud-sdk
steps:
- name: credential-setup
image: "$(params.image)"
script: |
#!/usr/bin/env bash
set -xe
CRED_PATH="$(workspaces.credentials.path)/$(params.serviceAccountPath)"
Expand All @@ -38,9 +38,8 @@ spec:
if [[ "${GOOGLE_APPLICATION_CREDENTIALS}" != "" ]]; then
echo "GOOGLE_APPLICATION_CREDENTIALS is set, activating Service Account..."
gcloud auth activate-service-account --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
fi
- name: run-gsutil
image: "$(params.image)"
command: [gsutil]
args: ["$(params.command)", "$(params.options[*])"]

fi
- name: run-gsutil
image: "$(params.image)"
command: [gsutil]
args: ["$(params.command)", "$(params.options[*])"]
2 changes: 1 addition & 1 deletion git/examples/git-clone-checking-out-a-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- name: revision
value: $(params.branch-name)
- name: cat-readme
runAfter: ["fetch-repo"] # Wait until the clone is done before reading the readme.
runAfter: ["fetch-repo"] # Wait until the clone is done before reading the readme.
workspaces:
- name: source
workspace: shared-data
Expand Down
4 changes: 2 additions & 2 deletions git/examples/git-clone-checking-out-a-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ spec:
- name: revision
value: $(params.commit)
- name: compare-received-commit-to-expected
runAfter: ["fetch-repo"] # Wait until the clone is done before reading the readme.
runAfter: ["fetch-repo"] # Wait until the clone is done before reading the readme.
params:
- name: expected-commit
value: $(params.commit)
Expand Down Expand Up @@ -84,4 +84,4 @@ spec:
- name: repo-url
value: https://github.com/tektoncd/pipeline.git
- name: commit
value: 301b41380e95382a18b391c2165fa3a6a3de93b0 # Tekton Pipeline's first ever commit!
value: 301b41380e95382a18b391c2165fa3a6a3de93b0 # Tekton Pipeline's first ever commit!
2 changes: 1 addition & 1 deletion git/examples/using-git-clone-result.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
name: validate-tag-sha
workspaces:
- name: output
emptyDir: {} # We don't care about the repo contents in this example, just the "commit" result
emptyDir: {} # We don't care about the repo contents in this example, just the "commit" result
params:
- name: repo-url
value: https://github.com/tektoncd/pipeline.git
Expand Down
2 changes: 1 addition & 1 deletion github/add-labels/add-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ spec:
split_url = urllib.parse.urlparse(
"$(params.REQUEST_URL)").path.split("/")
# This will convert https://github.com/foo/bar/pull/202 to
# api url path /repos/foo/issues/202
Expand Down
4 changes: 2 additions & 2 deletions github/add-labels/example/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ spec:
- name: REQUEST_URL
value: https://github.com/Divyansh42/aws-cli/pull/1
- name: LABELS
value:
value:
- approve
- kind/feature
- kind/feature
4 changes: 2 additions & 2 deletions github/create-github-release/example/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 500Mi
storage: 500Mi
- name: upload
configmap:
name: upload-asset
- name: release-notes
configmap:
name: release-file
name: release-file
14 changes: 7 additions & 7 deletions gitlab/add-labels.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,31 +52,31 @@ spec:
import sys
import http.client
import urllib.parse
split_url = urllib.parse.urlparse(
"$(params.REQUEST_URL)").path.split("/")
# Creating the API URL
# This will convert https://gitlab.com/foo/bar/issues/202 to
# api url path /projects/foo/bar/issues/202
api_url = "$(params.API_PATH_PREFIX)" + "/projects/" + "%2F".join(split_url[1:3]) + \
"/" + split_url[4] + "/" + split_url[-1]
# Get array of Labels
labels = sys.argv[1: ]
labels_string = ','.join(labels)
data = {
"labels": labels_string
}
# Adding the data as the query parameter
params = urllib.parse.urlencode(data)
api_url += "?" + params
print("Sending the data to GitLab: ")
print(data)
conn = http.client.HTTPSConnection("$(params.GITLAB_HOST_URL)")
Expand All @@ -86,18 +86,18 @@ spec:
headers={
"Authorization": "Bearer " + os.environ["TOKEN"],
})
resp = conn.getresponse()
if not str(resp.status).startswith("2"):
print("Error: %d" % (resp.status))
print(resp.read())
else:
print("Labels has been added to "
"$(params.REQUEST_URL)")
env:
- name: TOKEN
valueFrom:
secretKeyRef:
name: $(params.GITLAB_TOKEN_SECRET)
key: $(params.GITLAB_TOKEN_SECRET_KEY)
key: $(params.GITLAB_TOKEN_SECRET_KEY)
6 changes: 3 additions & 3 deletions gitlab/create-gitlab-release/create-gitlab-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spec:
image: registry.access.redhat.com/ubi8/ubi-minimal:latest
script: |
#!/usr/bin/env bash
# Creating asset json if file is to be uploaded with gitlab release
#
assetJson=""
Expand Down Expand Up @@ -72,10 +72,10 @@ spec:
curl --header 'Content-Type: application/json' --header "PRIVATE-TOKEN:$TOKEN" \
--data "$(generate_api_post_data)" \
--request POST https://gitlab.com/api/v4/projects/$(params.PROJECT_ID)/releases
env:
- name: TOKEN
valueFrom:
secretKeyRef:
name: $(params.GITLAB_TOKEN_SECRET)
key: $(params.GITLAB_TOKEN_SECRET_KEY)
key: $(params.GITLAB_TOKEN_SECRET_KEY)
2 changes: 1 addition & 1 deletion kubectl/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ rules:
- get
- create
- update
- delete
- delete
3 changes: 1 addition & 2 deletions kubectl/kubectl-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
default: "false"
description: Enable set owner reference for created resource.
- name: image
default: index.docker.io/aipipeline/kubeclient:v0.0.2 # it is huge
default: index.docker.io/aipipeline/kubeclient:v0.0.2 # it is huge
description: Kubectl wrapper image
steps:
- name: kubeconfig
Expand Down Expand Up @@ -61,4 +61,3 @@ spec:
else
echo "no output file found"
fi
2 changes: 1 addition & 1 deletion kubectl/taskrun.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
- name: job-name
valueFrom: '{.metadata.name}'
- name: job-namespace
valueFrom: '{.metadata.namespace}'
valueFrom: '{.metadata.namespace}'
- name: set-ownerreference
value: "true"
- name: manifest
Expand Down
2 changes: 1 addition & 1 deletion maven/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
default:
- "package"
- name: MAVEN_MIRROR_URL
description: The Maven repository mirror url
description: The Maven repository mirror url
type: string
default: ""
- name: PROXY_USER
Expand Down
6 changes: 3 additions & 3 deletions openshift-provision/openshift-cluster-create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ spec:
- name: OPENSHIFT_INSTALLER_IMAGE
type: string
description: OpenShift installer base image for UPI installation
default: quay.io/openshift/origin-upi-installer:4.4
default: quay.io/openshift/origin-upi-installer:4.4
steps:
- name: openshift-install-config
image: registry.access.redhat.com/ubi8/ubi-minimal:latest
Expand Down Expand Up @@ -89,7 +89,7 @@ spec:
EOF
[[ -f install-config.yaml ]] && cat install-config.yaml
env:
- name: PULL_SECRET
valueFrom:
Expand All @@ -101,7 +101,7 @@ spec:
secretKeyRef:
name: openshift-install
key: public-ssh-key

- name: openshift-cluster-create
workingDir: $(workspaces.install-dir.path)
image: $(params.OPENSHIFT_INSTALLER_IMAGE)
Expand Down
8 changes: 4 additions & 4 deletions prettier/tests/run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
spec:
workspaces:
- name: shared-workspace
# description: The git repo will be cloned into this workspace and the config-defaults.yaml will be read from it.
# description: The git repo will be cloned into this workspace and the config-defaults.yaml will be read from it.
tasks:
- name: fetch-repo
taskRef:
Expand All @@ -27,10 +27,10 @@ spec:
workspaces:
- name: source
workspace: shared-workspace
params:
params:
- name: args
value:
- --write
value:
- --write
- "golang/build.yaml"
---
apiVersion: tekton.dev/v1beta1
Expand Down
Loading

0 comments on commit 29a74cb

Please sign in to comment.