Skip to main content

Environment variable

Native support of some CI platforms

Currently, supported CI are here:

  • CircleCI
  • Drone
  • AWS CodeBuild
  • GitHub Actions
  • Google Cloud Build

On the supported CI platform, the following parameters are complemented by the built-in environment variables.

  • -owner
  • -repo
  • -pr
  • -sha
  • -build-url

This feature is implemented by go-ci-env.

⚠️ You can also use tfcmt on other platform with CLI flags or Custom Environment Variable Definition.

Google Cloud Build Support

tfcmt >= v3.3.0

#376

Set the environment variable GOOGLE_CLOUD_BUILD.

GOOGLE_CLOUD_BUILD=true

Set the following environment variables using substitutions.

  • COMMIT_SHA
  • BUILD_ID
  • PROJECT_ID
  • _PR_NUMBER
  • _REGION

Specify the repository owner and name in tfcmt.yaml.

e.g.

tfcmt.yaml

repo_owner: suzuki-shunsuke
repo_name: tfcmt

Custom Environment Variable Definition

caution

This feature was removed from v4.0.0 for security reason.