forked from konflux-ci/release-service-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test-create-pyxis-image-fail-dockerfile-not-pulled.yaml
66 lines (64 loc) · 1.83 KB
/
test-create-pyxis-image-fail-dockerfile-not-pulled.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
apiVersion: tekton.dev/v1
kind: Pipeline
metadata:
name: test-create-pyxis-image-fail-dockerfile-not-pulled
annotations:
test/assert-task-failure: "run-task"
spec:
description: |
Run the create-pyxis-image task with a single containerImage in the snapshot.
oras command to pull dockerfile will succeed, but there will be no Dockerfile saved,
so the task fails.
workspaces:
- name: tests-workspace
tasks:
- name: setup
workspaces:
- name: data
workspace: tests-workspace
taskSpec:
workspaces:
- name: data
steps:
- name: setup-values
image: quay.io/konflux-ci/release-service-utils:dc0f89c98b102fdff4644fa5dc411a60f2035b29
script: |
#!/usr/bin/env sh
set -eux
cat > $(workspaces.data.path)/mapped_snapshot.json << EOF
{
"application": "myapp",
"components": [
{
"name": "comp",
"containerImage": "dockerfile-file-missing@sha256:abcdef1234",
"repository": "registry.io/image",
"tags": [
"testtag"
]
}
]
}
EOF
cat > "$(workspaces.data.path)/mydata.json" << EOF
{
}
EOF
- name: run-task
taskRef:
name: create-pyxis-image
params:
- name: pyxisSecret
value: test-create-pyxis-image-cert
- name: server
value: stage
- name: snapshotPath
value: mapped_snapshot.json
- name: dataPath
value: mydata.json
workspaces:
- name: data
workspace: tests-workspace
runAfter:
- setup