-
Notifications
You must be signed in to change notification settings - Fork 8
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
remove python dependency to simplify use in MFE build/deployment #4
Comments
another thing to consider is argument parsing, it seems https://argbash.dev/ should be a good way to handle that example argbash template for parsing atlas args #!/bin/bash
#
# openedx-atlas argbash (https://argbash.dev/) argument template
#
# ARG_OPTIONAL_SINGLE([config], , [path to alternative atlas.yaml configuration file])
# ARG_OPTIONAL_SINGLE([branch], b, [branch to pull], [main])
# ARG_OPTIONAL_SINGLE([repository], r, [repository to pull])
# ARG_OPTIONAL_SINGLE([directory], d, [directory to pull])
# ARG_POSITIONAL_SINGLE([positional-command-arg], [only one command is available: pull], )
# ARG_HELP([Atlas is a CLI tool that has essentially one command: \`atlas pull\`\n \nAtlas defaults to using a configuration file named `atlas.yaml` placed\nin the root directory. Configuration file:\n \npull:\n branch: <branch-name>\n directory <directory-name>\n repository: <organization-name>/<repository-name>\n \nAtlas can also use a configuration file in a different path using the \`--config\` flag\nafter \`atlas\`: \`atlas --config pull\`.\n \nAtlas can also be used without a configuration file by using the flags below after\n\`atlas pull\`.\n \n\`-b\` or \`--branch\`\n\`-r\` or \`--repository\`\n\`-d\` or \`--directory\`\n])
# ARGBASH_GO
# [ <-- needed because of Argbash
echo "Value of --config: $_arg_config"
echo "Value of --branch: $_arg_branch"
echo "Value of --repository: $_arg_repository"
echo "Value of --directory: $_arg_directory"
echo "Value of positional-command-arg: $_arg_positional_command_arg"
# ] <-- needed because of Argbash |
recommendation from @kdmccormick https://www.shellcheck.net/wiki/Home
|
i put together a proof-of-concept of this the atlas side is here: brian-smith-tcril#1, it includes a gh actions workflow that runs argbash and shellcheck, as well as a workflow that runs when a tag is pushed to create a release on the MFE side of things, i put together a proof-of-concept on this branch of course authoring. this branch updates the things left to do for feature parity with the python version:
|
after looking over a bunch of different testing frameworks, i've decided to move forward using ShellSpec my reasoning behind this decision:
(potential/subjective) downsides to this choice:
alternatives considered (why i decided against them): |
Considering the goals of https://github.com/openedx/openedx-translations include no longer having translated strings checked in to individual repos, it makes sense to utilize atlas during the build/deployment process for MFEs. With this in mind, as discussed in OEP-58
A few options were presented:
.gzip
releases on https://github.com/openedx/openedx-translationsAfter looking into these options, moving to bash seems to be the simplest way to ensure the functionality we desire from atlas is available in all the environments we expect to run it in.
The text was updated successfully, but these errors were encountered: