Skip to content

Commit

Permalink
update task/generate-odcs-compose/0.2/generate-odcs-compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
rh-tap-build-team[bot] authored Jul 14, 2024
1 parent b58b7cd commit 2167288
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions task/generate-odcs-compose/0.2/generate-odcs-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: generate-odcs-compose
spec:
params:
- name: COMPOSE_INPUTS
description: relative path from workdir workspace to the compose inputs file
default: source/compose_inputs.yaml
- name: COMPOSE_OUTPUTS
description: relative path from workdir workspace to store compose output files
default: fetched.repos.d
workspaces:
- name: workdir
description: |
Working directory that will be used for reading configuration files
and writing the output
results:
- name: repodir_path
description: Directory to write the result .repo files.
steps:
- name: generate-odcs-compose
image: quay.io/redhat-appstudio/tools:39497ad4e7761c90fdde580cbb5bce9cb9491427
env:
- name: CLIENT_ID
valueFrom:
secretKeyRef:
name: odcs-service-account
key: client-id
- name: CLIENT_SECRET
valueFrom:
secretKeyRef:
name: odcs-service-account
key: client-secret
- name: COMPOSE_INPUTS
value: "$(params.COMPOSE_INPUTS)"
- name: COMPOSE_OUTPUTS
value: "$(params.COMPOSE_OUTPUTS)"
script: |
#!/bin/bash
set -ex
repodir_path="$(workspaces.workdir.path)/${COMPOSE_OUTPUTS}"
cd "$(workspaces.workdir.path)"
odcs_compose_generator \
--compose-input-yaml-path "${COMPOSE_INPUTS}" \
--compose-dir-path "${repodir_path}"
echo "$repodir_path" > $(results.repodir_path.path)

0 comments on commit 2167288

Please sign in to comment.