Run (Formerly Build)
Load all your secrets from Onboardbase to a recognized command on a machine
build is being depreciated but still works actively and is now replaced with run
Usage:
onboardbase run [command]
Flags:
-c, --command=command Command to run
-e, --environment=environment Environment to run by default
-h, --help show CLI help
-k, --prefix=prefix Prefix
-p, --project=project name of project
-s, --passphrase=passphrase Passphrase
--verbose Prints outs additional information
Basic
The Onboardbase CLI can inject your secrets from the Onboardbase cloud into a registered command on a machine.
For example, if all your REACT Frontend project ENV are on Onboardbase, the CLI can inject all those secrets into your start command
, and process.env.ENV_NAME
would be populated in your React project
onboardbase run --command="your project start command" -p [PROJECT_NAME] -e [ENVIRONMENT_NAME=development]
Posix also works
onboardbase run -- "Your command"
The build command takes
--command
the command to run e.genv
-p
the project to pull secrets from-e
The environment of the machine defaults to development
An example of a complete build command:
onboardbase run --command="env" -p "MARKETING_FE" -e "development"
Which would inject all the development secrets for the Marketing Frontend Project on Onboardbase and run the env
command to show all environment variables on the machine.
Options
--command, -c
--command, -c
This is the command to run after successfully pulling secrets from your Onboardbase account.
The below example would load all the secrets from the project in a setup file and output them to the terminal.
onboardbase run -c "env"
--verbose
--verbose
This tells the Onboardbase CLI to print out additional information based on some background tests we perform while executing run
. For example, if you have local secrets in the setup file that have not be synced with the secrets on Onboardbase, supplying the --verbose
flag will detect them and provide instructions on how to sync them.
onboardbase run -c "yarn start" --verbose
A sample response is:
We noticed you have some new secret which have not been added to Onboardbase and suggest you create a recommendation to avoid having sensitive secrets locally. The secret keynames are:
-FRONTEND_URL
Run onboardbase recommendation:create --from-local-secrets to upload your local secrets to onboardbase.
--project, -p
--project, -p
If you don't have a setup file or you want to override the project in your setup file, you can set the project option to be the name of a registered project for your Onboardbase account.
onboardbase run -c "env" --project "frontend-dx"
--environment, -e
--environment, -e
If you don't have a setup file or you want to override the environment in your setup file, you can set the environment option to be the name of a registered environment for an Onboardbase project. The default value is development
onboardbase run -c "env" --project "frontend-dx" -e "staging"
--passphrase, -s
--passphrase, -s
Onboardbase CLI securely caches your secrets on your machine so you can use them when there is no network connection.
A passphrase is used during the process to secure the secrets, which is a token that stands as a key to lock/unlock the cached secrets.
You can make this unique for each project by specifying the string to use as the passphrase for caching and reading a cached secret.
onboardbase run -c "env" --passphrase "something_unique"
--live-reload
--live-reload
Onboardbase CLI supports real-time, live reload anytime an update is made to a project while the build is running.
This keeps your work in sync with the secrets from Onboardbase and saves an organization's admin the time and effort to tell everyone to restart their build when an update is made.
To secure your build command go to Secure build
--sync
--sync
Only run this if you are aware of changes to the project secrets and you want to pull them manually. onboardbase run will always pull updates whenever there is a new change, but you can force it like this:
onboardbase run "env" --sync
Updated 11 months ago