Created
December 6, 2019 20:31
-
-
Save calebwashburn/83c343e634152ef056afd8309a46137d to your computer and use it in GitHub Desktop.
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
# The inputs, outputs, params, filename, and filepath | |
# of this task file are part of its semantically versioned API. | |
# See our documentation for a detailed discussion of our semver API. | |
# See www.semver.org for an explanation of semantic versioning. | |
# code_snippet configure-director start yaml | |
--- | |
platform: linux | |
inputs: | |
- name: platform-automation-tasks | |
- name: config # contains the director configuration file | |
- name: env # contains the env file with target OpsMan Information | |
- name: vars # variable files to be made available | |
optional: true | |
- name: secrets | |
# secret files to be made available | |
# separate from vars, so they can be store securely | |
optional: true | |
- name: ops-files # operations files to custom configure the product | |
optional: true | |
params: | |
VARS_FILES: | |
# - Optional | |
# - Filepath to the Ops Manager vars yaml file | |
# - The path is relative to root of the task build, | |
# so `vars` and `secrets` can be used. | |
OPS_FILES: | |
# - Optional | |
# - Filepath to the Ops Manager operations yaml files | |
# - The path is relative to root of the task build | |
ENV_FILE: env.yml | |
# - Required | |
# - Filepath of the env config YAML | |
# - The path is relative to root of the `env` input | |
DIRECTOR_CONFIG_FILE: director.yml | |
# - Required | |
# - Filepath to the director configuration yaml file | |
# - The path is relative to the root of the `config` input | |
run: | |
path: bash | |
args: | |
- "-c" | |
- | | |
vars_files_args=("") | |
for vf in ${VARS_FILES} | |
do | |
vars_files_args+=("--vars-file ${vf}") | |
done | |
ops_files_args=("") | |
for of in ${OPS_FILES} | |
do | |
ops_files_args+=("--ops-file ${of}") | |
done | |
# ${vars_files_args[@] needs to be globbed to pass through properly | |
# ${ops_files_args[@] needs to be globbed to pass through properly | |
# shellcheck disable=SC2068 | |
om --env env/"${ENV_FILE}" configure-director --ignore-verifier-warnings \ | |
--config "config/${DIRECTOR_CONFIG_FILE}" \ | |
${vars_files_args[@]} \ | |
${ops_files_args[@]} | |
# code_snippet configure-director end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment