Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature to apply-changes to specific products by name #47

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feature to apply-changes to specific products by name
Houlistonm committed May 7, 2022

Verified

This commit was signed with the committer’s verified signature. The key has expired.
zakkak Foivos Zakkak
commit 500499b7f45c7d727dca592d7281d9f722f70555
7 changes: 7 additions & 0 deletions tasks/apply-changes.sh
Original file line number Diff line number Diff line change
@@ -18,6 +18,13 @@ if [ -n "${ERRAND_CONFIG_FILE}" ]; then
flags+=("--config" "${ERRAND_CONFIG_FILE}")
fi

if [ -n "${PRODUCTS}" ]; then
IFS=':' read -ra product_names <<< "${PRODUCTS}"
for product_name in "${product_names[@]}"; do
flags+=("--product-name" "${product_name}")
done
fi

# ${flags[@] needs to be globbed to pass through properly
# shellcheck disable=SC2068
om --env env/"${ENV_FILE}" apply-changes \
6 changes: 6 additions & 0 deletions tasks/apply-changes.yml
Original file line number Diff line number Diff line change
@@ -38,6 +38,12 @@ params:
# - This is not recommended unless unless the warning failure(s)
# are well understood.

PRODUCTS:
# - Optional
# - Defaults to all products.
# - Colon separated string of products;
# for example, `cf:pivotal-telemetry-om:...`

run:
path: platform-automation-tasks/tasks/apply-changes.sh
# code_snippet apply-changes end