Referenceoctopaas CLI
octopaas environment
The environment variables octopaas reads, and CI/CD use
octopaas reads these environment variables:
OCTOPAAS_URL The API to talk to, such as https://api.octopaas.dev.
Overrides the profile's url; --url overrides it.
OCTOPAAS_KEY An API key (octo_...) to authenticate with. Overrides the
profile's key and any signed-in session.
OCTOPAAS_PROFILE The profile to use, for one shell or one job, without
changing the current one. --profile overrides it.
OCTOPAAS_ENVIRONMENT
The environment to act in, such as staging. Overrides the
profile's; --environment overrides it. Unset, and with no
profile environment, commands act in the default, octo.
OCTOPAAS_HOME Where config.yaml and credentials.yaml live
(default ~/.octopaas).
NO_COLOR, CI Either one switches off colours and animations.
OCTOPAAS_NO_UPDATE_NOTIFIER
Set to anything to stop octopaas mentioning new releases.Precedence, strongest first: flags, then the environment, then the profile, then the defaults.
API keys are for automation, such as CI/CD; people should sign in with octopaas auth login, which keeps no secret on disk beyond a renewable session. In a pipeline, set OCTOPAAS_URL and OCTOPAAS_KEY from your secret store and run commands directly. No config file is needed, and none is written:
export OCTOPAAS_URL=https://api.octopaas.dev
export OCTOPAAS_KEY=${{ secrets.OCTOPAAS_KEY }}
octopaas integrations push billing ./billing
octopaas versions create billing "$GITHUB_REF_NAME"
octopaas deployments rollout billing-prod --version "$GITHUB_REF_NAME"A key acts as the user who minted it, with that user's current roles, so mint it for an account whose roles fit the pipeline.