1515# limitations under the License.
1616
1717# This script calls out to scripts in tektoncd/plumbing to setup a cluster
18- # and deploy Tekton Pipelines to it for running integration tests.
18+ # and deploy Tekton Pipelines to it for running upgrading tests. There are
19+ # two scenarios we need to cover in this script:
20+
21+ # Scenario 1: install the previous release, upgrade to the current release, and
22+ # validate whether the Tekton pipeline works.
23+
24+ # Scenario 2: install the previous release, create the pipelines and tasks, upgrade
25+ # to the current release, and validate whether the Tekton pipeline works.
1926
2027source $( dirname $0 ) /e2e-common.sh
21- PREVIOUS_PIPELINE_VERSION=0 .5.2
28+ PREVIOUS_PIPELINE_VERSION=v0 .5.2
2229
2330# Script entry point.
2431
@@ -30,16 +37,20 @@ header "Setting up environment"
3037set +o errexit
3138set +o pipefail
3239
40+ # First, we will verify if Scenario 1 works.
41+ # Install the previous release.
3342header " Install the previous release of Tekton pipeline $PREVIOUS_PIPELINE_VERSION "
3443install_pipeline_crd_version $PREVIOUS_PIPELINE_VERSION
3544
45+ # Upgrade to the current release.
3646header " Upgrade to the current release of Tekton pipeline"
3747install_pipeline_crd
3848
39- # Run the tests
49+ # Run the integration tests.
4050failed=0
4151go_test_e2e -timeout=20m ./test || failed=1
4252
53+ # Run the post-integration tests.
4354for test in taskrun pipelinerun; do
4455 header " Running YAML e2e tests for ${test} s"
4556 if ! run_yaml_tests ${test} ; then
@@ -50,23 +61,32 @@ for test in taskrun pipelinerun; do
5061 fi
5162done
5263
53- # Remove all the pipeline CRDs
64+ # Remove all the pipeline CRDs, and clean up the environment for next Scenario.
5465uninstall_pipeline_crd
5566uninstall_pipeline_crd_version $PREVIOUS_PIPELINE_VERSION
5667
68+ # Next, we will verify if Scenario 2 works.
69+ # Install the previous release.
5770header " Install the previous release of Tekton pipeline $PREVIOUS_PIPELINE_VERSION "
5871install_pipeline_crd_version $PREVIOUS_PIPELINE_VERSION
5972
73+ # Create the resources of taskrun and pipelinerun, under the directories example/taskrun
74+ # and example/pipelinerun.
6075for test in taskrun pipelinerun; do
6176 header " Applying the resources ${test} s"
6277 apply_resources ${test}
6378done
6479
80+ # Upgrade to the current release.
6581header " Upgrade to the current release of Tekton pipeline"
6682install_pipeline_crd
6783
84+ # Run the integration tests.
6885go_test_e2e -timeout=20m ./test || failed=1
6986
87+ # Run the post-integration tests. We do not need to install the resources again, since
88+ # they are installed before the upgrade. We verify if they still work, after going through
89+ # the upgrade.
7090for test in taskrun pipelinerun; do
7191 header " Running YAML e2e tests for ${test} s"
7292 if ! run_tests ${test} ; then
0 commit comments