Skip to content

Commit

Permalink
Use Tekton Catalog GA structure for tasks (#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil authored Aug 4, 2020
1 parent cc1b68e commit 7b2abc7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions test/e2e/tekton_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package e2e

import (
"fmt"
"strings"
"testing"
"time"
Expand Down Expand Up @@ -55,16 +56,16 @@ func TestTektonPipeline(t *testing.T) {
_, err = kubectl.Run("apply", "-f", basedir+"/kn-deployer-rbac.yaml")
assert.NilError(t, err)

_, err = kubectl.Run("apply", "-f", "https://raw.githubusercontent.com/tektoncd/catalog/v1beta1/git/git-clone.yaml")
_, err = kubectl.Run("apply", "-f", tektonCatalogTask("git-clone", "0.1"))
assert.NilError(t, err)

_, err = kubectl.Run("apply", "-f", basedir+"/resources.yaml")
assert.NilError(t, err)

_, err = kubectl.Run("apply", "-f", "https://raw.githubusercontent.com/tektoncd/catalog/v1beta1/buildah/buildah.yaml")
_, err = kubectl.Run("apply", "-f", tektonCatalogTask("buildah", "0.1"))
assert.NilError(t, err)

_, err = kubectl.Run("apply", "-f", "https://raw.githubusercontent.com/tektoncd/catalog/v1beta1/kn/kn.yaml")
_, err = kubectl.Run("apply", "-f", tektonCatalogTask("kn", "0.1"))
assert.NilError(t, err)

_, err = kubectl.Run("apply", "-f", basedir+"/kn-pipeline.yaml")
Expand All @@ -91,3 +92,11 @@ func waitForPipelineSuccess(k test.Kubectl) error {
return strings.Contains(out, "True"), err
})
}

func tektonCatalogTask(taskName, version string) string {
return fmt.Sprintf(
"https://raw.githubusercontent.com/tektoncd/catalog/"+
"master/task/%s/%s/%s.yaml",
taskName, version, taskName,
)
}

0 comments on commit 7b2abc7

Please sign in to comment.