Skip to content

Commit 4e53ad3

Browse files
committed
Update output and added run-script task
1 parent 3831b3d commit 4e53ad3

File tree

2 files changed

+80
-6
lines changed

2 files changed

+80
-6
lines changed

.tekton/ansible-chatbot-stack-pull-request.yaml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ spec:
2424
- name: revision
2525
value: '{{revision}}'
2626
- name: output-image
27-
value: quay.io/redhat-user-workloads/ansible-lightspeed-tenant/ansible-chatbot-stack:on-pr-{{revision}}
27+
value: quay.io/ansible/ansible-chatbot-stack:on-pr-{{pull_request_number}}-{{revision}}
2828
- name: image-expires-after
2929
value: 5d
3030
- name: dockerfile
3131
value: Containerfile
32+
- name: build-args
33+
value:
34+
- ANSIBLE_CHATBOT_VERSION=0.1.9
35+
- LLAMA_STACK_RUN_CONFIG=ansible-chatbot-run.yaml
3236
pipelineSpec:
3337
description: |
3438
This pipeline is ideal for building container images from a Containerfile while maintaining trust after pipeline customization.
@@ -198,6 +202,34 @@ spec:
198202
workspace: git-auth
199203
- name: netrc
200204
workspace: netrc
205+
- name: run-script
206+
params:
207+
- name: ociStorage
208+
value: $(params.output-image).script
209+
- name: ociArtifactExpiresAfter
210+
value: $(params.image-expires-after)
211+
- name: SCRIPT_RUNNER_IMAGE
212+
value: registry.access.redhat.com/ubi9/ubi-minimal
213+
- name: SCRIPT
214+
value: |
215+
#!/bin/sh
216+
mkdir -p llama-stack/providers.d/inline/agents/
217+
curl -o llama-stack/providers.d/inline/agents/lightspeed_inline_agent.yaml https://raw.githubusercontent.com/lightspeed-core/lightspeed-providers/refs/heads/main/resources/external_providers/inline/agents/lightspeed_inline_agent.yaml
218+
- name: HERMETIC
219+
value: $(params.hermetic)
220+
- name: SOURCE_ARTIFACT
221+
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
222+
runAfter:
223+
- prefetch-dependencies
224+
taskRef:
225+
params:
226+
- name: name
227+
value: run-script-oci-ta
228+
- name: bundle
229+
value: quay.io/konflux-ci/tekton-catalog/task-run-script-oci-ta:0.1@sha256:c0f627069353ebd6d1ed03c8657e281eaf11be63706ea38cc53caf16cf4ffd65
230+
- name: kind
231+
value: task
232+
resolver: bundles
201233
- name: build-container
202234
params:
203235
- name: IMAGE
@@ -222,11 +254,14 @@ spec:
222254
- name: PRIVILEGED_NESTED
223255
value: $(params.privileged-nested)
224256
- name: SOURCE_ARTIFACT
225-
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
257+
value: $(tasks.run-script.results.SCRIPT_ARTIFACT)
258+
- name: ADDITIONAL_BASE_IMAGES
259+
value:
260+
- $(tasks.run-script.results.SCRIPT_RUNNER_IMAGE_REFERENCE)
226261
- name: CACHI2_ARTIFACT
227262
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
228263
runAfter:
229-
- prefetch-dependencies
264+
- run-script
230265
taskRef:
231266
params:
232267
- name: name

.tekton/ansible-chatbot-stack-push.yaml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,13 @@ spec:
2323
- name: revision
2424
value: '{{revision}}'
2525
- name: output-image
26-
value: quay.io/redhat-user-workloads/ansible-lightspeed-tenant/ansible-chatbot-stack:{{revision}}
26+
value: quay.io/ansible/ansible-chatbot-stack:{{revision}}
2727
- name: dockerfile
2828
value: Containerfile
29+
- name: build-args
30+
value:
31+
- ANSIBLE_CHATBOT_VERSION=0.1.9
32+
- LLAMA_STACK_RUN_CONFIG=ansible-chatbot-run.yaml
2933
pipelineSpec:
3034
description: |
3135
This pipeline is ideal for building container images from a Containerfile while maintaining trust after pipeline customization.
@@ -195,6 +199,34 @@ spec:
195199
workspace: git-auth
196200
- name: netrc
197201
workspace: netrc
202+
- name: run-script
203+
params:
204+
- name: ociStorage
205+
value: $(params.output-image).script
206+
- name: ociArtifactExpiresAfter
207+
value: $(params.image-expires-after)
208+
- name: SCRIPT_RUNNER_IMAGE
209+
value: registry.access.redhat.com/ubi9/ubi-minimal
210+
- name: SCRIPT
211+
value: |
212+
#!/bin/sh
213+
mkdir -p llama-stack/providers.d/inline/agents/
214+
curl -o llama-stack/providers.d/inline/agents/lightspeed_inline_agent.yaml https://raw.githubusercontent.com/lightspeed-core/lightspeed-providers/refs/heads/main/resources/external_providers/inline/agents/lightspeed_inline_agent.yaml
215+
- name: HERMETIC
216+
value: $(params.hermetic)
217+
- name: SOURCE_ARTIFACT
218+
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
219+
runAfter:
220+
- prefetch-dependencies
221+
taskRef:
222+
params:
223+
- name: name
224+
value: run-script-oci-ta
225+
- name: bundle
226+
value: quay.io/konflux-ci/tekton-catalog/task-run-script-oci-ta:0.1@sha256:c0f627069353ebd6d1ed03c8657e281eaf11be63706ea38cc53caf16cf4ffd65
227+
- name: kind
228+
value: task
229+
resolver: bundles
198230
- name: build-container
199231
params:
200232
- name: IMAGE
@@ -219,11 +251,14 @@ spec:
219251
- name: PRIVILEGED_NESTED
220252
value: $(params.privileged-nested)
221253
- name: SOURCE_ARTIFACT
222-
value: $(tasks.prefetch-dependencies.results.SOURCE_ARTIFACT)
254+
value: $(tasks.run-script.results.SCRIPT_ARTIFACT)
255+
- name: ADDITIONAL_BASE_IMAGES
256+
value:
257+
- $(tasks.run-script.results.SCRIPT_RUNNER_IMAGE_REFERENCE)
223258
- name: CACHI2_ARTIFACT
224259
value: $(tasks.prefetch-dependencies.results.CACHI2_ARTIFACT)
225260
runAfter:
226-
- prefetch-dependencies
261+
- run-script
227262
taskRef:
228263
params:
229264
- name: name
@@ -533,6 +568,10 @@ spec:
533568
value: $(tasks.build-image-index.results.IMAGE_URL)
534569
- name: IMAGE_DIGEST
535570
value: $(tasks.build-image-index.results.IMAGE_DIGEST)
571+
- name: ADDITIONAL_TAGS
572+
value:
573+
- latest
574+
- 0.9.$(tasks.git-metadata.results.commit-timestamp)
536575
runAfter:
537576
- build-image-index
538577
taskRef:

0 commit comments

Comments
 (0)