Skip to content

Commit ecbcc67

Browse files
mvalarhAllda
authored andcommitted
gitInitImage and builder_image as parameter to operator-ci pipeline
- cosmetics in upstream-community playbooks Signed-off-by: Martin Vala <[email protected]>
1 parent 995f720 commit ecbcc67

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

ansible/playbooks/upstream-community.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
tags:
4848
- tekton-task
4949
- tekton-pipeline
50+
- ci
5051

5152
- name: "Delete kind cluster"
5253
include_role:

ansible/roles/install-kind-cluster/tasks/install_registry.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
- absent
2020
- directory
2121

22-
- name: "Generate certificate in to '{{ registry_cert_dir }}'"
22+
- name: "Generate certificate in to '{{ registry_cert_dir }}' for host '{{ registry_hostname }}'"
2323
ansible.builtin.command: 'openssl req -newkey rsa:4096 -nodes -sha256 -keyout {{ registry_cert_dir }}/domain.key -x509 -days 365 -subj ''/CN=${reg_name}'' -addext "subjectAltName=DNS:{{ registry_hostname }},DNS:localhost,DNS:host.containers.internal" -out {{ registry_cert_dir }}/domain.crt -batch'
2424
failed_when: false
2525
changed_when: true
2626

2727
- name: "Setting registry arguments in case of ssl support"
2828
ansible.builtin.set_fact:
2929
ikc_registry_args: "-v {{ registry_cert_dir }}:/certs:Z -e REGISTRY_HTTP_ADDR=0.0.0.0:5000 -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key"
30-
when: registry_ssl|bool
30+
when: registry_ssl | bool
3131

3232
- name: "Start registry '{{ registry_name }}' at port '{{ registry_port }}'"
3333
ansible.builtin.command: "{{ container_tool }} run -d --restart=always --name {{ registry_name }} {{ ikc_registry_args | default('') }} -p {{ registry_port }}:5000 registry:2"

ansible/roles/install-kind-cluster/tasks/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- name: "Failing when cluster is not running"
3838
ansible.builtin.fail:
3939
msg: "Kind cluster is not running !!!"
40-
when: api_status.failed is undefined or api_status.failed|bool
40+
when: api_status.failed is undefined or api_status.failed | bool
4141

4242
- name: "Pull index image '{{ kind_verify_index_image }}'"
4343
ansible.builtin.command: "{{ container_tool }} pull {{ kind_verify_index_image }}"
@@ -51,7 +51,6 @@
5151
ansible.builtin.command: "{{ container_tool }} push {{ kind_verify_index_image_local }}"
5252
changed_when: true
5353

54-
5554
- name: "Delete existing index pod"
5655
kubernetes.core.k8s:
5756
api_version: v1

ansible/roles/operator-pipeline/templates/openshift/pipelines/operator-ci-pipeline.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ spec:
1212
default: "digestPinning"
1313
- name: git_email
1414
default: "[email protected]"
15+
- name: gitInitImage
16+
description: The image providing the git-init binary that this Task runs.
17+
type: string
18+
default: "registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:bc551c776fb3d0fcc6cfd6d8dc9f0030de012cb9516fac42b1da75e6771001d9"
1519
- name: upstream_repo_name
1620
default: ""
1721
description: Upstream repository where the pull request will be opened (namespace/name)
1822
- name: upstream_repo_branch
1923
default: main
2024
description: Branch in the upstream repo to use as the base for the pull request
2125
- name: bundle_path
26+
- name: builder_image
27+
default: "registry.redhat.io/rhel8/buildah@sha256:a1e5cc0fb334e333e5eab69689223e8bd1f0c060810d260603b26cf8c0da2023"
2228
- name: registry
2329
default: image-registry.openshift-image-registry.svc:5000
2430
- name: env
@@ -89,7 +95,7 @@ spec:
8995
- name: revision
9096
value: $(params.git_branch)
9197
- name: gitInitImage
92-
value: registry.redhat.io/openshift-pipelines/pipelines-git-init-rhel8@sha256:bc551c776fb3d0fcc6cfd6d8dc9f0030de012cb9516fac42b1da75e6771001d9
98+
value: $(params.gitInitImage)
9399
workspaces:
94100
- name: output
95101
workspace: pipeline
@@ -146,6 +152,8 @@ spec:
146152
value: "$(params.git_email)"
147153
- name: dirty_flag
148154
value: "$(tasks.digest-pinning.results.dirty_flag)"
155+
- name: gitInitImage
156+
value: $(params.gitInitImage)
149157
workspaces:
150158
- name: source
151159
workspace: pipeline
@@ -297,6 +305,8 @@ spec:
297305
value: "$(params.bundle_path)"
298306
- name: TLSVERIFY
299307
value: "$(params.tlsverify)"
308+
- name: BUILDER_IMAGE
309+
value: "$(params.builder_image)"
300310
workspaces:
301311
- name: source
302312
workspace: pipeline

docs/kind-cluster.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,8 @@ $ ansible-pull ansible/playbooks/upstream-community.yaml \
9292
--tags tekton-task,tekton-pipeline
9393
```
9494

95+
## Enable tekton dashboard
96+
```
97+
kubectl port-forward -n tekton-pipelines service/tekton-dashboard 9097:9097
98+
```
99+
and then visit http://127.0.0.1:9097

0 commit comments

Comments
 (0)