Skip to content

Commit 2f9975a

Browse files
committed
feat: generate testing-devel/testing-farm.yaml from base/testing-farm
1 parent 41271e2 commit 2f9975a

File tree

5 files changed

+135
-27
lines changed

5 files changed

+135
-27
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- testing-farm.yaml
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
apiVersion: appstudio.redhat.com/v1beta2
3+
kind: IntegrationTestScenario
4+
metadata:
5+
labels:
6+
test.appstudio.openshift.io/optional: "true"
7+
name: fedora-coreos-kola-tests-x86-64
8+
spec:
9+
application: fedora-coreos
10+
contexts:
11+
- name: component_fedora-coreos
12+
resolverRef:
13+
params:
14+
- name: url
15+
value: https://gitlab.com/testing-farm/integrations-konflux
16+
- name: revision
17+
value: v3.16
18+
- name: pathInRepo
19+
value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml
20+
resolver: git
21+
params:
22+
- name: COMPOSE
23+
value: Fedora-43
24+
- name: ARCH
25+
value: x86_64
26+
- name: IMAGE_TAG
27+
value: v3.16
28+
- name: GIT_URL
29+
value: https://github.com/Roshan-R/fedora-coreos-config
30+
- name: GIT_REF
31+
value: testing-farm-kola
32+
- name: TMT_PLAN
33+
value: tmt
34+
---
35+
apiVersion: appstudio.redhat.com/v1beta2
36+
kind: IntegrationTestScenario
37+
metadata:
38+
labels:
39+
test.appstudio.openshift.io/optional: "true"
40+
name: fedora-coreos-kola-tests-aarch64
41+
spec:
42+
application: fedora-coreos
43+
contexts:
44+
- name: component_fedora-coreos
45+
resolverRef:
46+
params:
47+
- name: url
48+
value: https://gitlab.com/testing-farm/integrations-konflux
49+
- name: revision
50+
value: v3.16
51+
- name: pathInRepo
52+
value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml
53+
resolver: git
54+
params:
55+
- name: COMPOSE
56+
value: Fedora-43
57+
- name: ARCH
58+
value: aarch64
59+
- name: IMAGE_TAG
60+
value: v3.16
61+
- name: GIT_URL
62+
value: https://github.com/Roshan-R/fedora-coreos-config
63+
- name: GIT_REF
64+
value: testing-farm-kola
65+
- name: TMT_PLAN
66+
value: tmt
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
apiVersion: kustomize.config.k8s.io/v1beta1
3+
kind: Kustomization
4+
resources:
5+
- ../../base/testing-farm
6+
transformers:
7+
- |-
8+
apiVersion: builtin
9+
kind: PrefixSuffixTransformer
10+
metadata:
11+
name: SuffixTransformer2
12+
suffix: "-testing-devel"
13+
fieldSpecs:
14+
- kind: IntegrationTestScenario
15+
path: spec/application
16+
- kind: IntegrationTestScenario
17+
path: spec/contexts/name
18+
patches:
19+
- target:
20+
kind: IntegrationTestScenario
21+
name: fedora-coreos-kola-tests-x86-64
22+
patch: |-
23+
- op: replace
24+
path: /metadata/name
25+
value: fedora-coreos-kola-tests-testing-devel-x86-64
26+
- target:
27+
kind: IntegrationTestScenario
28+
name: fedora-coreos-kola-tests-aarch64
29+
patch: |-
30+
- op: replace
31+
path: /metadata/name
32+
value: fedora-coreos-kola-tests-testing-devel-aarch64

.tekton/testing-devel/testing-farm.yaml renamed to .tekton/testing-devel/testing-farm/testing-farm.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,16 @@ kind: IntegrationTestScenario
33
metadata:
44
labels:
55
test.appstudio.openshift.io/optional: "true"
6-
name: fedora-coreos-testing-devel-kola-tests-x86-64
6+
name: fedora-coreos-kola-tests-testing-devel-aarch64
77
spec:
88
application: fedora-coreos-testing-devel
99
contexts:
1010
- name: component_fedora-coreos-testing-devel
11-
resolverRef:
12-
params:
13-
- name: url
14-
value: https://gitlab.com/testing-farm/integrations-konflux
15-
- name: revision
16-
value: v3.16
17-
- name: pathInRepo
18-
value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml
19-
resolver: git
2011
params:
2112
- name: COMPOSE
2213
value: Fedora-43
2314
- name: ARCH
24-
value: x86_64
15+
value: aarch64
2516
- name: IMAGE_TAG
2617
value: v3.16
2718
- name: GIT_URL
@@ -30,31 +21,31 @@ spec:
3021
value: testing-farm-kola
3122
- name: TMT_PLAN
3223
value: tmt
24+
resolverRef:
25+
params:
26+
- name: url
27+
value: https://gitlab.com/testing-farm/integrations-konflux
28+
- name: revision
29+
value: v3.16
30+
- name: pathInRepo
31+
value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml
32+
resolver: git
3333
---
3434
apiVersion: appstudio.redhat.com/v1beta2
3535
kind: IntegrationTestScenario
3636
metadata:
3737
labels:
3838
test.appstudio.openshift.io/optional: "true"
39-
name: fedora-coreos-testing-devel-kola-tests-aarch64
39+
name: fedora-coreos-kola-tests-testing-devel-x86-64
4040
spec:
4141
application: fedora-coreos-testing-devel
4242
contexts:
4343
- name: component_fedora-coreos-testing-devel
44-
resolverRef:
45-
params:
46-
- name: url
47-
value: https://gitlab.com/testing-farm/integrations-konflux
48-
- name: revision
49-
value: v3.16
50-
- name: pathInRepo
51-
value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml
52-
resolver: git
5344
params:
5445
- name: COMPOSE
5546
value: Fedora-43
5647
- name: ARCH
57-
value: aarch64
48+
value: x86_64
5849
- name: IMAGE_TAG
5950
value: v3.16
6051
- name: GIT_URL
@@ -63,3 +54,12 @@ spec:
6354
value: testing-farm-kola
6455
- name: TMT_PLAN
6556
value: tmt
57+
resolverRef:
58+
params:
59+
- name: url
60+
value: https://gitlab.com/testing-farm/integrations-konflux
61+
- name: revision
62+
value: v3.16
63+
- name: pathInRepo
64+
value: pipeline/tmt-via-testing-farm/tmt-via-testing-farm.yaml
65+
resolver: git

ci/generate-tekton-pipelinerun

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,14 @@ for event_kustomization in $REPO_ROOT/.tekton/*/*/kustomization.yaml; do
1818
if [[ "$event_name" = "base" ]] || [[ "$stream_name" = "base" ]]; then
1919
continue
2020
fi
21-
echo -e " generating ${stream_name}-${event_name} pipelinerun"
22-
kustomize build "${event_dir}" -o "${event_dir}"
23-
output_file=$(find ${event_dir}/tekton.dev*)
24-
kustomize cfg cat "$output_file" > ${output_file/tekton.dev_*_pipelinerun_/}
25-
rm -f "${output_file}"
21+
if [[ "$event_name" = "testing-farm" ]]; then
22+
echo -e " generating ${stream_name}-testing-farm"
23+
kustomize build "${event_dir}" > "${event_dir}/testing-farm.yaml"
24+
else
25+
echo -e " generating ${stream_name}-${event_name} pipelinerun"
26+
kustomize build "${event_dir}" -o "${event_dir}"
27+
output_file=$(find ${event_dir}/tekton.dev*)
28+
kustomize cfg cat "$output_file" > ${output_file/tekton.dev_*_pipelinerun_/}
29+
rm -f "${output_file}"
30+
fi
2631
done

0 commit comments

Comments
 (0)