CorefinityCorefinityDocs
Open the Control PanelControl Panel
Code and deployments · 8 of 10

Give a site's deployment commands a value, such as a key or a URL, without putting it in the repository.

On this page

Before you start

  • You can open the site in Managed Websites. Anyone who can open a site can add, change, reveal and delete its variables.
  • Each environment has its own variables: choose Production or Staging in the site header first.
  • For a token that signs a build in to a private npm or Composer registry, use Private registries.

Add a variable

  1. Open the site's deployments

    Go to Managed Websites, choose the site, then Deployments under Code & backups. On the Variables card, choose Add variable.

  2. Enter the name and value

    Enter the Name in letters, digits and underscores: the CF_ in front is added for you. Enter the Value, leave Hidden chosen unless the value is not secret, such as a flag or a URL, then choose Save.

The variable reaches every command of the environment's pipeline from the next deployment, as $CF_PAYMENT_WEBHOOK_KEY. A Hidden value is masked wherever it appears in deployment logs.

Used in names the stages whose commands read the variable, or reads Not used. An environment holds up to 100 variables, and a value up to 2,048 characters on one line.

Reveal, change or delete a variable

  1. Open the variable's menu

    Open the variable's … menu and choose Reveal, Edit or Delete.

ChoiceWhat it does
RevealShows the value, with Copy, until you close the dialog. Each reveal is recorded in the site's Activity.
EditSets a new value or changes In deployment logs. Leave Value blank to keep the current one. The name cannot change.
DeleteCommands that read the variable get an empty value from the next deployment.

Add a variable for every site

  1. Open the organisation's deployments

    Go to Organisation › Organisations, choose your organisation, then Deployments under Developers. On the Company variables card, choose Add variable.

The variable reaches every build of your organisation's sites, and is never shown in logs. This needs an owner, or a role with Edit Environment Deployment Pipeline, and an organisation holds up to 100.

On a site, the row's Source names your organisation. Choose Set for this environment on that row to give the environment its own value, which wins.

Automate this

Variables

Creates the variable when the environment does not have it and changes it otherwise, then answers the whole list with each value masked.

PUT/api/corestack/sites/{site}/deployments/variables/{name}
curl -X PUT https://manage.corefinity.com/api/corestack/sites/1042/deployments/variables/API_TOKEN \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "value": "example-value-not-a-real-secret"
  }'
Was this helpful?
Open in ClaudeOpen in ChatGPT