Skip to content

Commit

Permalink
updating the tnk-cli image to match the version deployed in cluster, …
Browse files Browse the repository at this point in the history
…this allows logs to be viewed.

Signed-off-by: Adam D. Cornett <adc@redhat.com>
  • Loading branch information
acornett21 authored and Allda committed Sep 29, 2023
1 parent 862a3fc commit a085154
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
params:
- name: pipelines_cli_tkn_image
description: Teknton cli image
default: "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:cc8bbdb079578605a66447529d7de76f32882dc2ada571e39ff18e483cdbdf49"
default: "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2"
- name: github_host_url
description: |
The GitHub host, adjust this if you run a GitHub enteprise.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
default: "registry.access.redhat.com/ubi8-minimal@sha256:54ef2173bba7384dc7609e8affbae1c36f8a3ec137cacc0866116d65dd4b9afe"
- name: tkn_image
description: Tekton CLI image
default: registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:19ed78054fc0f7f26f1198637a10d83f837734c8abf7ffc78836a6fa37ad9033
default: registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2
- name: metrics_url
description: |
A metrics collector route.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
- name: pipeline_image
- name: pipelines_cli_tkn_image
description: Teknton cli image
default: "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:cc8bbdb079578605a66447529d7de76f32882dc2ada571e39ff18e483cdbdf49"
default: "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2"
- name: pyxis_api_key_secret_name
default: default-api-secret
description: Kubernetes secret name that contains Pyxis API key. Valid only when external Pyxis is used.
Expand Down
4 changes: 2 additions & 2 deletions operator-pipeline-images/tests/data/pipelinerun.json
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,7 @@
"steps": [
{
"container": "step-gather-info",
"imageID": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:4e548e1dcd98031563f5c4208edd552ff09cb635e5b519ce8166c8debdda73b9",
"imageID": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2",
"name": "gather-info",
"terminated": {
"containerID": "cri-o://712c79de24855d303e4a4d5ca8eb3d17d066ef4cec4ec7294be8ebb7c1bde80d",
Expand Down Expand Up @@ -2860,7 +2860,7 @@
],
"steps": [
{
"image": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:cc8bbdb079578605a66447529d7de76f32882dc2ada571e39ff18e483cdbdf49",
"image": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2",
"name": "gather-info",
"resources": {},
"script": "#! /usr/bin/env bash\nset -xe\n\nPR_NAME=\"$(params.pipelinerun)\"\nmkdir $PR_NAME\n\necho \"Getting PipelineRun details\"\ntkn pipelinerun describe $PR_NAME -o json \u003e $PR_NAME/pipelinerun.json\n\necho \"Getting TaskRun details\"\ntkn taskrun list \\\n --label 'tekton.dev/pipelineRun'==\"$PR_NAME\" \\\n -o jsonpath='{.items}' \\\n \u003e $PR_NAME/taskruns.json\n\nchmod -R 777 $PR_NAME\n",
Expand Down
6 changes: 3 additions & 3 deletions operator-pipeline-images/tests/data/taskruns.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"kind": "TaskRun",
"metadata": {
"annotations": {
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"Task\",\"metadata\":{\"annotations\":{},\"name\":\"github-add-pipelinerun-summary-comment\",\"namespace\":\"amisstea\"},\"spec\":{\"description\":\"This task adds a PipelineRun summary comment to a GitHub pull request.\",\"params\":[{\"default\":\"api.github.com\",\"description\":\"The GitHub host, adjust this if you run a GitHub enteprise.\\n\",\"name\":\"github_host_url\"},{\"default\":\"\",\"description\":\"The API path prefix, GitHub Enterprise has a prefix e.g. /api/v3\\n\",\"name\":\"api_path_prefix\"},{\"description\":\"The GitHub issue or pull request URL where we want to add a new\\ncomment.\\n\",\"name\":\"request_url\"},{\"default\":\"github\",\"description\":\"The name of the Kubernetes Secret that contains the GitHub token.\\n\",\"name\":\"github_token_secret_name\"},{\"default\":\"token\",\"description\":\"The key within the Kubernetes Secret that contains the GitHub token.\\n\",\"name\":\"github_token_secret_key\"},{\"description\":\"The name of the PipelineRun to summarize.\",\"name\":\"pipelinerun\"},{\"description\":\"The common pipeline image.\",\"name\":\"pipeline_image\"},{\"default\":\"\",\"description\":\"A comment to append to the end of the summary\",\"name\":\"comment_suffix\"}],\"steps\":[{\"image\":\"registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:cc8bbdb079578605a66447529d7de76f32882dc2ada571e39ff18e483cdbdf49\",\"name\":\"gather-info\",\"script\":\"#! /usr/bin/env bash\\nset -xe\\n\\nPR_NAME=\\\"$(params.pipelinerun)\\\"\\nmkdir $PR_NAME\\n\\necho \\\"Getting PipelineRun details\\\"\\ntkn pipelinerun describe $PR_NAME -o json \\u003e $PR_NAME/pipelinerun.json\\n\\necho \\\"Getting TaskRun details\\\"\\ntkn taskrun list \\\\\\n --label 'tekton.dev/pipelineRun'==\\\"$PR_NAME\\\" \\\\\\n -o jsonpath='{.items}' \\\\\\n \\u003e $PR_NAME/taskruns.json\\n\\nchmod -R 777 $PR_NAME\\n\",\"workingDir\":\"$(workspaces.output.path)\"},{\"image\":\"$(params.pipeline_image)\",\"name\":\"build-comment\",\"script\":\"#! /usr/bin/env bash\\nset -xe\\n\\nPR_NAME=\\\"$(params.pipelinerun)\\\"\\n\\npipelinerun-summary $PR_NAME/pipelinerun.json $PR_NAME/taskruns.json \\\\\\n \\u003e $PR_NAME/comment.md\\n\\nif [ ! -z \\\"$(params.comment_suffix)\\\" ]; then\\n echo \\\"$(params.comment_suffix)\\\" \\u003e\\u003e $PR_NAME/comment.md\\nfi\\n\",\"workingDir\":\"$(workspaces.output.path)\"},{\"env\":[{\"name\":\"GITHUBTOKEN\",\"valueFrom\":{\"secretKeyRef\":{\"key\":\"$(params.github_token_secret_key)\",\"name\":\"$(params.github_token_secret_name)\"}}}],\"image\":\"registry.access.redhat.com/ubi8/ubi-minimal:8.2\",\"name\":\"post-comment\",\"script\":\"#!/usr/libexec/platform-python\\nimport json\\nimport os\\nimport sys\\nimport http.client\\nimport urllib.parse\\n\\nsplit_url = urllib.parse.urlparse(\\n \\\"$(params.request_url)\\\").path.split(\\\"/\\\")\\n\\n# This will convert https://github.com/foo/bar/pull/202 to\\n# api url path /repos/foo/issues/\\napi_url = \\\"{base}/repos/{package}/issues/{id}\\\".format(\\n base=\\\"\\\", package=\\\"/\\\".join(split_url[1:3]), id=split_url[-1])\\n\\nwith open(\\\"$(params.pipelinerun)/comment.md\\\") as fh:\\n data = {\\\"body\\\": fh.read()}\\n\\nconn = http.client.HTTPSConnection(\\\"$(params.github_host_url)\\\")\\n\\nmethod = \\\"POST\\\"\\ntarget_url = api_url + \\\"/comments\\\"\\n\\nprint(\\\"Sending this data to GitHub with {}: \\\".format(method))\\nprint(data)\\nr = conn.request(\\n method,\\n target_url,\\n body=json.dumps(data),\\n headers={\\n \\\"User-Agent\\\": \\\"TektonCD, the peaceful cat\\\",\\n \\\"Authorization\\\": \\\"Bearer \\\" + os.environ[\\\"GITHUBTOKEN\\\"],\\n })\\nresp = conn.getresponse()\\n\\nif not str(resp.status).startswith(\\\"2\\\"):\\n print(\\\"Error: %d\\\" % (resp.status))\\n print(resp.read())\\n sys.exit(1)\\nelse:\\n print(\\\"A GitHub comment has been added to $(params.request_url)\\\")\\n\",\"workingDir\":\"$(workspaces.output.path)\"}],\"workspaces\":[{\"description\":\"Scratch space and storage for the comment\",\"name\":\"output\"}]}}\n",
"kubectl.kubernetes.io/last-applied-configuration": "{\"apiVersion\":\"tekton.dev/v1beta1\",\"kind\":\"Task\",\"metadata\":{\"annotations\":{},\"name\":\"github-add-pipelinerun-summary-comment\",\"namespace\":\"amisstea\"},\"spec\":{\"description\":\"This task adds a PipelineRun summary comment to a GitHub pull request.\",\"params\":[{\"default\":\"api.github.com\",\"description\":\"The GitHub host, adjust this if you run a GitHub enteprise.\\n\",\"name\":\"github_host_url\"},{\"default\":\"\",\"description\":\"The API path prefix, GitHub Enterprise has a prefix e.g. /api/v3\\n\",\"name\":\"api_path_prefix\"},{\"description\":\"The GitHub issue or pull request URL where we want to add a new\\ncomment.\\n\",\"name\":\"request_url\"},{\"default\":\"github\",\"description\":\"The name of the Kubernetes Secret that contains the GitHub token.\\n\",\"name\":\"github_token_secret_name\"},{\"default\":\"token\",\"description\":\"The key within the Kubernetes Secret that contains the GitHub token.\\n\",\"name\":\"github_token_secret_key\"},{\"description\":\"The name of the PipelineRun to summarize.\",\"name\":\"pipelinerun\"},{\"description\":\"The common pipeline image.\",\"name\":\"pipeline_image\"},{\"default\":\"\",\"description\":\"A comment to append to the end of the summary\",\"name\":\"comment_suffix\"}],\"steps\":[{\"image\":\"registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2\",\"name\":\"gather-info\",\"script\":\"#! /usr/bin/env bash\\nset -xe\\n\\nPR_NAME=\\\"$(params.pipelinerun)\\\"\\nmkdir $PR_NAME\\n\\necho \\\"Getting PipelineRun details\\\"\\ntkn pipelinerun describe $PR_NAME -o json \\u003e $PR_NAME/pipelinerun.json\\n\\necho \\\"Getting TaskRun details\\\"\\ntkn taskrun list \\\\\\n --label 'tekton.dev/pipelineRun'==\\\"$PR_NAME\\\" \\\\\\n -o jsonpath='{.items}' \\\\\\n \\u003e $PR_NAME/taskruns.json\\n\\nchmod -R 777 $PR_NAME\\n\",\"workingDir\":\"$(workspaces.output.path)\"},{\"image\":\"$(params.pipeline_image)\",\"name\":\"build-comment\",\"script\":\"#! /usr/bin/env bash\\nset -xe\\n\\nPR_NAME=\\\"$(params.pipelinerun)\\\"\\n\\npipelinerun-summary $PR_NAME/pipelinerun.json $PR_NAME/taskruns.json \\\\\\n \\u003e $PR_NAME/comment.md\\n\\nif [ ! -z \\\"$(params.comment_suffix)\\\" ]; then\\n echo \\\"$(params.comment_suffix)\\\" \\u003e\\u003e $PR_NAME/comment.md\\nfi\\n\",\"workingDir\":\"$(workspaces.output.path)\"},{\"env\":[{\"name\":\"GITHUBTOKEN\",\"valueFrom\":{\"secretKeyRef\":{\"key\":\"$(params.github_token_secret_key)\",\"name\":\"$(params.github_token_secret_name)\"}}}],\"image\":\"registry.access.redhat.com/ubi8/ubi-minimal:8.2\",\"name\":\"post-comment\",\"script\":\"#!/usr/libexec/platform-python\\nimport json\\nimport os\\nimport sys\\nimport http.client\\nimport urllib.parse\\n\\nsplit_url = urllib.parse.urlparse(\\n \\\"$(params.request_url)\\\").path.split(\\\"/\\\")\\n\\n# This will convert https://github.com/foo/bar/pull/202 to\\n# api url path /repos/foo/issues/\\napi_url = \\\"{base}/repos/{package}/issues/{id}\\\".format(\\n base=\\\"\\\", package=\\\"/\\\".join(split_url[1:3]), id=split_url[-1])\\n\\nwith open(\\\"$(params.pipelinerun)/comment.md\\\") as fh:\\n data = {\\\"body\\\": fh.read()}\\n\\nconn = http.client.HTTPSConnection(\\\"$(params.github_host_url)\\\")\\n\\nmethod = \\\"POST\\\"\\ntarget_url = api_url + \\\"/comments\\\"\\n\\nprint(\\\"Sending this data to GitHub with {}: \\\".format(method))\\nprint(data)\\nr = conn.request(\\n method,\\n target_url,\\n body=json.dumps(data),\\n headers={\\n \\\"User-Agent\\\": \\\"TektonCD, the peaceful cat\\\",\\n \\\"Authorization\\\": \\\"Bearer \\\" + os.environ[\\\"GITHUBTOKEN\\\"],\\n })\\nresp = conn.getresponse()\\n\\nif not str(resp.status).startswith(\\\"2\\\"):\\n print(\\\"Error: %d\\\" % (resp.status))\\n print(resp.read())\\n sys.exit(1)\\nelse:\\n print(\\\"A GitHub comment has been added to $(params.request_url)\\\")\\n\",\"workingDir\":\"$(workspaces.output.path)\"}],\"workspaces\":[{\"description\":\"Scratch space and storage for the comment\",\"name\":\"output\"}]}}\n",
"pipeline.tekton.dev/release": "v0.24.3"
},
"creationTimestamp": "2021-11-10T18:40:07Z",
Expand Down Expand Up @@ -156,7 +156,7 @@
"steps": [
{
"container": "step-gather-info",
"imageID": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:4e548e1dcd98031563f5c4208edd552ff09cb635e5b519ce8166c8debdda73b9",
"imageID": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2",
"name": "gather-info",
"terminated": {
"containerID": "cri-o://712c79de24855d303e4a4d5ca8eb3d17d066ef4cec4ec7294be8ebb7c1bde80d",
Expand Down Expand Up @@ -242,7 +242,7 @@
],
"steps": [
{
"image": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:cc8bbdb079578605a66447529d7de76f32882dc2ada571e39ff18e483cdbdf49",
"image": "registry.redhat.io/openshift-pipelines/pipelines-cli-tkn-rhel8@sha256:7fdeb7eae1727957ba7a7c0e812e5306ffbc594b7759ab058b262251c1ad6fd2",
"name": "gather-info",
"resources": {},
"script": "#! /usr/bin/env bash\nset -xe\n\nPR_NAME=\"$(params.pipelinerun)\"\nmkdir $PR_NAME\n\necho \"Getting PipelineRun details\"\ntkn pipelinerun describe $PR_NAME -o json > $PR_NAME/pipelinerun.json\n\necho \"Getting TaskRun details\"\ntkn taskrun list \\\n --label 'tekton.dev/pipelineRun'==\"$PR_NAME\" \\\n -o jsonpath='{.items}' \\\n > $PR_NAME/taskruns.json\n\nchmod -R 777 $PR_NAME\n",
Expand Down

0 comments on commit a085154

Please sign in to comment.