-
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 apply resources for scenario2 of upgrade test
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 apply_resources function to enable the 2nd scenario of the upgrade test 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 resources in v1 examples that are not under beta or no-ci. part of: #5193
- Loading branch information
Showing
3 changed files
with
121 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: {} |