-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update task/generate-odcs-compose/0.2/generate-odcs-compose.yaml
- Loading branch information
1 parent
b58b7cd
commit 2167288
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |