Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e: Run tekton e2e against pipeline v0.11.1 #803

Merged
merged 4 commits into from
Apr 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
navidshaikh marked this conversation as resolved.
Show resolved Hide resolved
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