main
ROOT /
pages /
build-spec-secret.md
17 lines | ISO-8859-1 | 632 bytes

Usage Scenario

Use secret values in build spec

How to Set Up

We should never use secret value directly in build spec as otherwise everyone with permission to read code can know the secret. Instead we define it in build setting, and reference it via variables

  1. Define a secret say db-password in build setting:

    Secret Build Setting

    We specify authorized branches as master, meaning that only build spec from master branch can access this secret

  2. Now reference the secret from build spec via variable. For instance:

    Use Job Secret

Please wait...
Page is in error, reload to recover