Repository: tektoncd/operator
Pull request #884 (2022-07-04 17:09:40)

[release-v0.60.x] Update tkn download URLs, add arm64
# Changes

The tkn tarballs and zips now include tkn-pac in a single archive.

This is a cherry-pick of #876.

# Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

- [x] Includes [tests](https://github.com/tektoncd/community/blob/master/standards.md#principles) (if functionality changed/added)
- [ ] Includes [docs](https://github.com/tektoncd/community/blob/master/standards.md#principles) (if user facing)
- [ ] Commit messages follow [commit message best practices](https://github.com/tektoncd/community/blob/master/standards.md#commit-messages)

_See [the contribution guide](https://github.com/tektoncd/operator/blob/master/CONTRIBUTING.md) for more details._

# Release Notes

```release-note
NONE
```

/cc @concaf @vdemeester


tekton-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by:
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **concaf** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @concaf` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://prow.tekton.dev/command-help?repo=tektoncd%2Foperator).

<details open>
Needs approval from an approver in each of these files:

- **[OWNERS](https://github.com/tektoncd/operator/blob/release-v0.60.x/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["concaf"]} -->
tekton-robot: Hi @yselkowitz. Thanks for your PR.

I'm waiting for a [tektoncd](https://github.com/orgs/tektoncd/people) member to verify that this patch is reasonable to test. If it is, they should reply with `/ok-to-test` on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should [join the org](https://github.com/orgs/tektoncd/people) to skip this step.

Once the patch is verified, the new status will be reflected by the `ok-to-test` label.

I understand the commands that are listed [here](https://go.k8s.io/bot-commands?repo=tektoncd%2Foperator).

<details>

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
</details>

tekton-robot: [APPROVALNOTIFIER] This PR is **APPROVED**

This pull-request has been approved by: *<a href="https://github.com/tektoncd/operator/pull/884#pullrequestreview-1028219045" title="LGTM">concaf</a>*

The full list of commands accepted by this bot can be found [here](https://prow.tekton.dev/command-help?repo=tektoncd%2Foperator).

The pull request process is described [here](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process)

<details >
Needs approval from an approver in each of these files:

- ~~[OWNERS](https://github.com/tektoncd/operator/blob/release-v0.60.x/OWNERS)~~ [concaf]

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":[]} -->

Patch:
diff --git a/operatorhub/openshift/manifests/bases/openshift-pipelines-operator-rh.clusterserviceversion.template.yaml b/operatorhub/openshift/manifests/bases/openshift-pipelines-operator-rh.clusterserviceversion.template.yaml
index 5a6b161af..55f534003 100644
--- a/operatorhub/openshift/manifests/bases/openshift-pipelines-operator-rh.clusterserviceversion.template.yaml
+++ b/operatorhub/openshift/manifests/bases/openshift-pipelines-operator-rh.clusterserviceversion.template.yaml
@@ -239,7 +239,7 @@ spec:
     - Tekton Triggers: v0.20.1
     - Tekton Chains (tech-preview): v0.9.0
     - Tekton Hub (tech-preview): v1.8.0
-    - Pipelines as Code (tech-preview): 0.10.0
+    - Pipelines as Code (tech-preview): 0.10.1
 
     ## Getting Started
     In order to get familiar with _OpenShift Pipelines_ concepts and create your first pipeline, follow the [OpenShift Pipelines Docs](https://docs.openshift.com/container-platform/OPENSHIFT_DOCS_VERSION/cicd/pipelines/creating-applications-with-cicd-pipelines.html).
diff --git a/operatorhub/openshift/release-artifacts/bundle/manifests/openshift-pipelines-operator-rh.clusterserviceversion.yaml b/operatorhub/openshift/release-artifacts/bundle/manifests/openshift-pipelines-operator-rh.clusterserviceversion.yaml
index f4495dc36..80fa2d5f4 100644
--- a/operatorhub/openshift/release-artifacts/bundle/manifests/openshift-pipelines-operator-rh.clusterserviceversion.yaml
+++ b/operatorhub/openshift/release-artifacts/bundle/manifests/openshift-pipelines-operator-rh.clusterserviceversion.yaml
@@ -288,7 +288,7 @@ spec:
 
     - Tekton Hub (tech-preview): v1.8.0
 
-    - Pipelines as Code (tech-preview): 0.10.0
+    - Pipelines as Code (tech-preview): 0.10.1
 
     ## Getting Started
 
diff --git a/pkg/reconciler/openshift/tektonaddon/transformer.go b/pkg/reconciler/openshift/tektonaddon/transformer.go
index 9edb3ec6f..148f0b423 100644
--- a/pkg/reconciler/openshift/tektonaddon/transformer.go
+++ b/pkg/reconciler/openshift/tektonaddon/transformer.go
@@ -78,48 +78,25 @@ func itemInSlice(item string, items []string) bool {
 
 func getlinks(baseURL, tknVersion string) []console.CLIDownloadLink {
 	platformURLs := []struct {
-		platform  string
-		tknURL    string
-		tknPacURL string
+		platform string
+		tknURL   string
 	}{
-		{
-			"Linux",
-			fmt.Sprintf("tkn/tkn-linux-amd64-%s.tar.gz", tknVersion),
-			fmt.Sprintf("tkn/tkn-pac-linux-amd64-%s.tar.gz", tknVersion),
-		},
-		{
-			"IBM Power",
-			fmt.Sprintf("tkn/tkn-linux-ppc64le-%s.tar.gz", tknVersion),
-			fmt.Sprintf("tkn/tkn-pac-linux-ppc64le-%s.tar.gz", tknVersion),
-		},
-		{
-			"IBM Z",
-			fmt.Sprintf("tkn/tkn-linux-s390x-%s.tar.gz", tknVersion),
-			fmt.Sprintf("tkn/tkn-pac-linux-s390x-%s.tar.gz", tknVersion),
-		},
-		{
-			"Mac",
-			fmt.Sprintf("tkn/tkn-macos-amd64-%s.tar.gz", tknVersion),
-			fmt.Sprintf("tkn/tkn-pac-macos-amd64-%s.tar.gz", tknVersion),
-		},
-		{
-			"Windows",
-			fmt.Sprintf("tkn/tkn-windows-amd64-%s.zip", tknVersion),
-			fmt.Sprintf("tkn/tkn-pac-windows-amd64-%s.zip", tknVersion),
-		},
+		{"Linux x86_64", "tkn/tkn-linux-amd64.tar.gz"},
+		{"Linux ARM 64", "tkn/tkn-linux-arm64.tar.gz"},
+		{"IBM Power", "tkn/tkn-linux-ppc64le.tar.gz"},
+		{"IBM Z", "tkn/tkn-linux-s390x.tar.gz"},
+		{"Mac x86_64", "tkn/tkn-macos-amd64.tar.gz"},
+		{"Mac ARM 64", "tkn/tkn-macos-arm64.tar.gz"},
+		{"Windows x86_64", "tkn/tkn-windows-amd64.zip"},
+		{"Windows ARM 64", "tkn/tkn-windows-arm64.zip"},
 	}
 	links := []console.CLIDownloadLink{}
 	for _, platformURL := range platformURLs {
 		links = append(links,
-			// tkn
+			// tkn and tkn-pac, single archive
 			console.CLIDownloadLink{
 				Href: getURL(baseURL, platformURL.tknURL),
-				Text: fmt.Sprintf("Download tkn for %s", platformURL.platform),
-			},
-			// tkn-pac
-			console.CLIDownloadLink{
-				Href: getURL(baseURL, platformURL.tknPacURL),
-				Text: fmt.Sprintf("Download tkn-pac for %s", platformURL.platform),
+				Text: fmt.Sprintf("Download tkn and tkn-pac for %s", platformURL.platform),
 			},
 		)
 	}


Test patch:
diff --git a/pkg/reconciler/openshift/tektonaddon/testdata/test-console-cli-expected.yaml b/pkg/reconciler/openshift/tektonaddon/testdata/test-console-cli-expected.yaml
index 79efb0fbc..736b2c28d 100644
--- a/pkg/reconciler/openshift/tektonaddon/testdata/test-console-cli-expected.yaml
+++ b/pkg/reconciler/openshift/tektonaddon/testdata/test-console-cli-expected.yaml
@@ -6,23 +6,19 @@ spec:
   description: The OpenShift Pipeline client `tkn` is a CLI tool that allows you to manage OpenShift Pipeline resources.
   displayName: tkn - OpenShift Pipeline Command Line Interface (CLI)
   links:
-    - href: https://testserver.com/tkn/tkn-linux-amd64-1.2.3.tar.gz
-      text: Download tkn for Linux
-    - href: https://testserver.com/tkn/tkn-pac-linux-amd64-1.2.3.tar.gz
-      text: Download tkn-pac for Linux
-    - href: https://testserver.com/tkn/tkn-linux-ppc64le-1.2.3.tar.gz
-      text: Download tkn for IBM Power
-    - href: https://testserver.com/tkn/tkn-pac-linux-ppc64le-1.2.3.tar.gz
-      text: Download tkn-pac for IBM Power
-    - href: https://testserver.com/tkn/tkn-linux-s390x-1.2.3.tar.gz
-      text: Download tkn for IBM Z
-    - href: https://testserver.com/tkn/tkn-pac-linux-s390x-1.2.3.tar.gz
-      text: Download tkn-pac for IBM Z
-    - href: https://testserver.com/tkn/tkn-macos-amd64-1.2.3.tar.gz
-      text: Download tkn for Mac
-    - href: https://testserver.com/tkn/tkn-pac-macos-amd64-1.2.3.tar.gz
-      text: Download tkn-pac for Mac
-    - href: https://testserver.com/tkn/tkn-windows-amd64-1.2.3.zip
-      text: Download tkn for Windows
-    - href: https://testserver.com/tkn/tkn-pac-windows-amd64-1.2.3.zip
-      text: Download tkn-pac for Windows
+    - href: https://testserver.com/tkn/tkn-linux-amd64.tar.gz
+      text: Download tkn and tkn-pac for Linux x86_64
+    - href: https://testserver.com/tkn/tkn-linux-arm64.tar.gz
+      text: Download tkn and tkn-pac for Linux ARM 64
+    - href: https://testserver.com/tkn/tkn-linux-ppc64le.tar.gz
+      text: Download tkn and tkn-pac for IBM Power
+    - href: https://testserver.com/tkn/tkn-linux-s390x.tar.gz
+      text: Download tkn and tkn-pac for IBM Z
+    - href: https://testserver.com/tkn/tkn-macos-amd64.tar.gz
+      text: Download tkn and tkn-pac for Mac x86_64
+    - href: https://testserver.com/tkn/tkn-macos-arm64.tar.gz
+      text: Download tkn and tkn-pac for Mac ARM 64
+    - href: https://testserver.com/tkn/tkn-windows-amd64.zip
+      text: Download tkn and tkn-pac for Windows x86_64
+    - href: https://testserver.com/tkn/tkn-windows-arm64.zip
+      text: Download tkn and tkn-pac for Windows ARM 64
diff --git a/test/config.sh b/test/config.sh
index 86787727a..400b233cc 100644
--- a/test/config.sh
+++ b/test/config.sh
@@ -3,5 +3,5 @@ export TEKTON_TRIGGERS_VERSION="v0.20.1"
 export TEKTON_RESULTS_VERSION="v0.4.0"
 export TEKTON_DASHBOARD_VERSION="v0.27.0"
 export TEKTON_CHAINS_VERSION="v0.9.0"
-export PAC_VERSION="0.10.0"
+export PAC_VERSION="0.10.1"
 export TEKTON_HUB_VERSION="v1.8.0"