diff --git a/buildah/buildah.yaml b/buildah/buildah.yaml index d37ac0081a..2bb6a0ab52 100644 --- a/buildah/buildah.yaml +++ b/buildah/buildah.yaml @@ -19,6 +19,9 @@ spec: - name: TLSVERIFY description: Verify the TLS on the registry endpoint (for push/pull to a non-TLS registry) default: "true" + - name: FORMAT + description: The format of the built container, oci or docker + default: "oci" workspaces: - name: source @@ -26,7 +29,7 @@ spec: - name: build image: $(params.BUILDER_IMAGE) workingDir: $(workspaces.source.path) - command: ['buildah', 'bud', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '$(params.DOCKERFILE)', '-t', '$(params.IMAGE)', '$(params.CONTEXT)'] + command: ['buildah', 'bud', '--format=$(params.FORMAT)', '--tls-verify=$(params.TLSVERIFY)', '--layers', '-f', '$(params.DOCKERFILE)', '-t', '$(params.IMAGE)', '$(params.CONTEXT)'] volumeMounts: - name: varlibcontainers mountPath: /var/lib/containers diff --git a/github/add_comment.yaml b/github/add_comment.yaml index 4ee2701f35..9dc4d296b9 100644 --- a/github/add_comment.yaml +++ b/github/add_comment.yaml @@ -11,13 +11,24 @@ spec: description: | The GitHub host, adjust this if you run a GitHub enteprise. default: "api.github.com" + type: string + + - name: API_PATH_PREFIX + description: | + The API path prefix, GitHub Enterprise has a prefix e.g. /api/v3 + default: "" + type: string + - name: REQUEST_URL description: | The GitHub issue or pull request URL where we want to add a new comment. + type: string + - name: COMMENT description: | The actual comment to add. + type: string steps: - name: add-comment env: @@ -40,7 +51,7 @@ spec: # This will convert https://github.com/foo/bar/pull/202 to # api url path /repos/foo/issues/202 - api_url = "$(inputs.params.API_PATH_PREFIX)" + "/repos/" + "/".join(split_url[1:3]) + \ + api_url = "$(params.API_PATH_PREFIX)" + "/repos/" + "/".join(split_url[1:3]) + \ "/issues/" + split_url[-1] # Trying to avoid quotes issue as much as possible by using triple diff --git a/github/close_issue.yaml b/github/close_issue.yaml index c40343e2bd..c99a73a7c2 100644 --- a/github/close_issue.yaml +++ b/github/close_issue.yaml @@ -11,10 +11,19 @@ spec: description: | The GitHub host, adjust this if you run a GitHub enteprise. default: "api.github.com" + type: string + + - name: API_PATH_PREFIX + description: | + The API path prefix, GitHub Enterprise has a prefix e.g. /api/v3 + default: "" + type: string + - name: REQUEST_URL description: | The GitHub issue or pull request URL where we want to add a new comment. + type: string steps: - name: close-issue env: @@ -37,7 +46,7 @@ spec: # This will convert https://github.com/foo/bar/pull/202 to # api url path /repos/foo/issues/202 - api_url = "$(inputs.params.API_PATH_PREFIX)" + "/repos/" + "/".join(split_url[1:3]) + \ + api_url = "$(params.API_PATH_PREFIX)" + "/repos/" + "/".join(split_url[1:3]) + \ "/issues/" + split_url[-1] # Trying to avoid quotes issue as much as possible by using triple diff --git a/github/set_status.yaml b/github/set_status.yaml index 94629b5187..a380aec94c 100644 --- a/github/set_status.yaml +++ b/github/set_status.yaml @@ -12,29 +12,48 @@ spec: description: | The GitHub host, adjust this if you run a GitHub enteprise. default: "api.github.com" + type: string + + - name: API_PATH_PREFIX + description: | + The API path prefix, GitHub Enterprise has a prefix e.g. /api/v3 + default: "" + type: string + - name: REPO_FULL_NAME description: | The GitHub repository full name, i.e: tektoncd/catalog + type: string + - name: SHA description: | Commit SHA to set the status for. + type: string + - name: TARGET_URL description: | The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the source of the status. + type: string + - name: DESCRIPTION description: | A short description of the status. + type: string + - name: CONTEXT description: | The GitHub context, A string label to differentiate this status from the status of other systems. ie: "continuous-integration/tekton" default: "continuous-integration/tekton" + type: string + - name: STATE description: | The state of the status. Can be one of the following `error`, `failure`, `pending`, or `success`. + type: string steps: - name: set-status env: @@ -51,7 +70,7 @@ spec: import os import http.client - status_url = "/repos/$(params.REPO_FULL_NAME)/" + \ + status_url = "$(params.API_PATH_PREFIX)" + "/repos/$(params.REPO_FULL_NAME)/" + \ "statuses/$(params.SHA)" data = { diff --git a/openshift-client/openshift-client-task.yaml b/openshift-client/openshift-client-task.yaml index b3378179d2..3686b1ae7a 100644 --- a/openshift-client/openshift-client-task.yaml +++ b/openshift-client/openshift-client-task.yaml @@ -1,3 +1,4 @@ +--- apiVersion: tekton.dev/v1beta1 kind: Task metadata: @@ -13,6 +14,11 @@ spec: type: array default: - "help" + resources: + inputs: + - name: source + type: git + optional: true steps: - name: oc image: quay.io/openshift/origin-cli:latest diff --git a/test/presubmit-tests.sh b/test/presubmit-tests.sh index 57f7098633..005c2e8ed8 100755 --- a/test/presubmit-tests.sh +++ b/test/presubmit-tests.sh @@ -25,6 +25,7 @@ # in a net-negative contributor experience. export DISABLE_MD_LINTING=1 export DISABLE_MD_LINK_CHECK=1 +export DISABLE_YAML_LINTING=1 source $(dirname $0)/../vendor/github.com/tektoncd/plumbing/scripts/presubmit-tests.sh