Skip to content

Commit

Permalink
e2e: Run tekton e2e against pipeline v0.11.1 (#803)
Browse files Browse the repository at this point in the history
* Use buildah task from master branch and paramterize FORMAT

* Configure pipeline v0.11.1

* DNM: Run tekton e2e in this PR

* Revert "DNM: Run tekton e2e in this PR"

This reverts commit 903f5be.
  • Loading branch information
navidshaikh authored Apr 15, 2020
1 parent 48f4359 commit 9828230
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 68 deletions.
2 changes: 1 addition & 1 deletion test/e2e/tekton_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestTektonPipeline(t *testing.T) {
_, err = kubectl.Run("apply", "-f", basedir+"/kn-deployer-rbac.yaml")
assert.NilError(t, err)

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

_, err = kubectl.Run("apply", "-f", "https://raw.githubusercontent.com/tektoncd/catalog/master/kn/kn.yaml")
Expand Down
66 changes: 0 additions & 66 deletions test/resources/tekton/buildah.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions test/resources/tekton/kn-pipeline-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ spec:
resourceRef:
name: buildah-build-kn-create-image
params:
- name: IMAGE_FORMAT
value: "docker"
- name: ARGS
value:
- "service"
Expand Down
5 changes: 5 additions & 0 deletions test/resources/tekton/kn-pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ spec:
description: Arguments to pass to kn CLI
default:
- "help"
- name: IMAGE_FORMAT
type: string
description: Image format to build and push to registry
tasks:
- name: buildah-build
taskRef:
Expand All @@ -43,6 +46,8 @@ spec:
value: ./test/test_images/helloworld/Dockerfile
- name: BUILDER_IMAGE
value: "quay.io/buildah/stable:latest"
- name: FORMAT
value: "$(params.IMAGE_FORMAT)"
- name: kn-service-create
taskRef:
name: kn
Expand Down
5 changes: 4 additions & 1 deletion test/tekton-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,18 @@ export PATH=$PATH:${REPO_ROOT_DIR}
# Script entry point.
initialize $@

export TEKTON_VERSION=${TEKTON_VERSION:-v0.9.2}
export TEKTON_VERSION=${TEKTON_VERSION:-v0.11.1}
export KN_E2E_NAMESPACE=tkn-kn

header "Running integration tests for Tekton"

subheader "Installing Tekton Pipelines ${TEKTON_VERSION}"
# Install Tekton if not already installed
if [[ $(kubectl api-resources | grep -c tekton.dev) -eq 0 ]]; then
kubectl apply -f https://github.com/tektoncd/pipeline/releases/download/${TEKTON_VERSION}/release.yaml
fi

subheader "Configuring docker and registry"
if (( IS_PROW )); then
# Configure Docker so that we can create a secret for GCR
gcloud auth configure-docker
Expand All @@ -53,6 +55,7 @@ for file in kn-deployer-rbac kn-pipeline-resource; do
-e "s#\${CONTAINER_REGISTRY}#${CONTAINER_REGISTRY}#" ${resource_dir}/${file}-template.yaml > ${resource_dir}/${file}.yaml
done

subheader "Running test pipeline"
go_test_e2e -timeout=30m -tags=tekton ./test/e2e || fail_test

success

0 comments on commit 9828230

Please sign in to comment.