-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore Upgrade Test Scenario2 by creating resources
Scenario 2 of the upgrade test aims to install pipeline server from the preivous release, create resources from that version and test on those resources against the client of the current release. This commit restores the resources creation of simple Task and Pipeline resources to enable the 2nd scenario of the upgrade test to work by applying the resources from the old server version of pipeline. It was preivously renamed and removed in #2685. It fixes the missing piece where the required resources from the previous release have not been created to accomplish scenario 2 of the upgrade test. More specifically, it creates a simple Task and Pipeline resources and then runs the two simple resources with a TaskRun and PipelineRun created after upgrading to the current version and verify that they both run successfully. /kind misc Closes #6868
- Loading branch information
Showing
3 changed files
with
122 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: Task | ||
metadata: | ||
name: simple-task | ||
namespace: upgrade | ||
spec: | ||
params: | ||
- name: rsp | ||
type: string | ||
default: "response" | ||
steps: | ||
- name: echo-param | ||
image: alpine | ||
script: | | ||
echo "$(params.rsp)" | ||
- name: check-workspace | ||
image: alpine | ||
script: | | ||
if [ "$(workspaces.workspace.bound)" == "true" ]; then | ||
echo "Workspace provided" | ||
fi | ||
sidecars: | ||
- name: server | ||
image: alpine:3.12.0 | ||
command: ['/bin/bash'] | ||
workingDir: /foo | ||
script: echo server | ||
workspaces: | ||
- name: workspace | ||
mountPath: /foo | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: Pipeline | ||
metadata: | ||
name: simple-pipeline | ||
namespace: upgrade | ||
spec: | ||
description: foo | ||
tasks: | ||
- name: check-workspace | ||
taskSpec: | ||
params: | ||
- name: task1-result | ||
type: string | ||
default: "1" | ||
steps: | ||
- image: alpine | ||
name: check-workspace | ||
script: | | ||
if [ "$(workspaces.workspace.bound)" == "true" ]; then | ||
echo "Workspace provided \n" | ||
echo $(params.task1-result) | ||
fi | ||
timeout: 180s | ||
workspaces: | ||
- name: workspace | ||
finally: | ||
- name: echo-status | ||
taskSpec: | ||
params: | ||
- name: echoStatus | ||
type: string | ||
default: "Succeeded" | ||
steps: | ||
- name: verify-status | ||
image: ubuntu | ||
script: echo $(params.echoStatus) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: tekton.dev/v1 | ||
kind: PipelineRun | ||
metadata: | ||
name: simple-pipelinerun | ||
namespace: upgrade | ||
spec: | ||
pipelineRef: | ||
name: simple-pipeline | ||
workspaces: | ||
- name: workspace | ||
emptyDir: {} | ||
--- | ||
apiVersion: tekton.dev/v1 | ||
kind: TaskRun | ||
metadata: | ||
name: simple-taskrun | ||
namespace: upgrade | ||
spec: | ||
taskRef: | ||
name: simple-task | ||
workspaces: | ||
- name: workspace | ||
emptyDir: {} |