Package: embedops-cli
EmbedOps ToolsCLI tool for enabling easier and smoother local development for embedded systems via the command line. Promotes usage of Docker and best practices for modern embedded development.Current FeaturesParse CI YAML files to allow for jobs to be run in the same containers and the same way locally as they do on CI.Python Packages neededdefined in requirements.txt and setup.cfgYAML finding and parsingFunctionality:Show names of all jobsShow detailed job contextLimitations:No guarantee of YAML written by anyone other than Dojo Five employees will be able to run as expectedCan only be run from the current working directory your pipeline scripts expect to be in as there is no way to set cwd explicitlyOnly works with BitBucket and GitLab YAML files, and GitHub Actions with only one workflow fileWill not use, search for, nor help set environment variables defined outside of YAMLno way to mark that a job shouldn't be run locally or hide non-runnable jobsWill show "hidden" GitLab jobs and allow them to be runDoes not handleextends:keyword in GitLab CI/CDOnly handles multi-line script with acomplete commandin each line.This is applied to both|(literal) and>(folded) YAML multiline block scalar indicatorFor example, it doesn't work if theif-elsestatement is called in multiple lines.Working example:script:|FILE=.clang-formatif[-f"$FILE"];thenecho"$FILEexists. Use repository$FILE.";elseecho"$FILEdoes not exist. Use container$FILE.";cp/tools/.clang-format.clang-format;fiFailing example:script:|FILE=.clang-formatif[-f"$FILE"];thenecho"$FILEexists. Use repository$FILE."elseecho"$FILEdoes not exist. Use container$FILE."cp/tools/.clang-format.clang-formatfiGitHubAuto-detection of the GitHub CI configuration file works only if there is one file in the .github/workflows directory. When there are more than one files in that directory, use the --filename flag to specify a GitHub CI configuration.Syntax:embedops-clijobs--filename<PATH_TO_CI_CONFIG_FILE>run<JOB_NAME>Not Implemented:Info to pull from YAML:after/before scripts?include:,extends:on GitLab,uses:on GitHub,pipe:on BitBucket not supportedDocker container launching / checking /runningFunctionality:use parsed YAML informationmap cwd to Docker container and launch (sets mounted directory as container's cwd)Run script in docker container found aboveOutput any artifacts in the mounted directoryLogin to the EmbedOps registry for paying clientsLimitations:Assume all jobs have an explicit image tag or a default image tag in yamlAssume all jobs have a script (not handling entrypoints)Must be launched from the top level working directory of the project (where YAML is stored)doesn't clean up after itself - all artifacts are left behind, not just desired ones.no way to specify clean and build vs rebuild unless explicitly defined in YAMLEnv variables used but not defined in YAML must be set by user in .env file manually, no error checkinglook for .wslconfig on Windows and suggest edits or add if not foundAttempt to start docker if it's not running?Execution of the docker image is not identical to CI pipeline execution leading to potential suttle differences in output behaviorThe CLI does not:utilize a bootstrap image so startup behavior compared to the CI pipeline is slightly differentPass script commands to the docker image via STDIN, instead a single command is executed in full with a singledocker run. This leads to some differences in how STDIN/STDOUT behave compared to the pipeline. A TTY is not created, an interactive session is not created (ie no-itpassed todocker run), and the docker session acts as if being run in a pipe.Reoccurring SSL Validation IssuesSome users have experienced SSL verification issues when attempting to connect to the web domains required for CLI functionaliy (Auth0 and EmbedOps Platform). This is caused by the user's host machine not having a valid Root certificate file or that file not containing the correct certificate for validating the domains. To avoid this issue, this project forces the use of thecertifipackage's Root certificate file for validating the domains previously mentioned and nothing else.Not Implemented:Run before or after scriptrun entire pipeline or workflow at onceshell and any other non-Docker based runners are not supported on any system at this timeEndpointsFunctionality:Log in to EmbedOps via CLIAuth0 connection from embedops.io to registryNot Implemented:Jobs run from CLI do not talk to APIInstallationFuntionality:Available on embedops.com in PyPi package registryLimitations:Little to no documentationNot Implemented:New version check and messageLicenseCopyright 2023 Dojo Five, LLC