Default variables

For example, the branch from which you deploy, and the ID of the pipeline run. You can use them in webhooks, notifications, conditional runs, and any place that require passing CI/CD-related information.

NameType & Example
BUDDY
Represents whether the current environment is a Buddy environment
Type: Boolean
Example: true
BUDDY_RUN_APPROVE_URL
The URL to the approve/decline prompt of the pipeline waiting for approval
Type: String
Example: https://app.buddy.works/workspace/project/pipelines/pipeline/1/execution/5d9dc42c422f5a26?approve=true
BUDDY_RUN_BRANCH
The name of the Git branch of the current pipeline run
Type: String
Example: master
BUDDY_RUN_CHANGELOG
The list of commits pushed since the last run revision (one commit per line)
Type: List
Example: [e5e13f8] Create buddy.yml | mikebenson | 2024-01-01T07:14:58
BUDDY_RUN_CHANGELOG_ADDED
The list of files added since the last run revision (comma-separated)
Type: List
Example: index.html,main.css
BUDDY_RUN_CHANGELOG_CHANGED
The list of files changed since the last run revision (comma-separated)
Type: List
Example: index.html,main.css
BUDDY_RUN_CHANGELOG_DELETED
The list of files deleted since the last run revision (comma-separated)
Type: List
Example: index.html,main.css
BUDDY_RUN_CLEAR_CACHE
Represents whether the cache was purged before the current pipeline run
Type: Boolean
Example: false
BUDDY_RUN_COMMENT
The comment attached to the current pipeline run
Type: String
Example: my first execution
BUDDY_RUN_EVENT_TYPE
The type of event that triggered the executed pipeline
Type: String
Example: GIT_CREATE
BUDDY_RUN_HASH
The hash of the current pipeline run
Type: String
Example: 5d9dc42c422f5a268b389d08
BUDDY_RUN_ID
The ID of the current pipeline run
Type: Integer
Example: 1
BUDDY_RUN_MODE
The trigger mode used to run the current pipeline run
Type: String
Example: CLICK / EVENT / SCHEDULE
BUDDY_RUN_PARALLEL_SLOT_NO
The slot number of the current execution
Type: Integer
Example: 1
BUDDY_RUN_PRE_COMMIT
The SHA1 hash of the commit of the previous pipeline run
Type: String
Example: e5e13f8b7f8d5c6096a0501dc09b48eef5fea96
BUDDY_RUN_PRE_COMMIT_MESSAGE
The commit message of the previously run revision
Type: String
Example: it is great to code it
BUDDY_RUN_PRE_COMMIT_SUBJECT
The commit subject of the previously run revision
Type: String
Example: New awesome feature
BUDDY_RUN_PR_BASE_BRANCH
The name of the Git BASE branch of the currently run Pull Request
Type: String
Example: master
BUDDY_RUN_PR_HEAD_BRANCH
The name of the Git HEAD branch of the currently run Pull Request
Type: String
Example: feature1
BUDDY_RUN_PR_ID
The ID of the currently run pull request
Type: String
Example: pull/1
BUDDY_RUN_PR_NO
The number of the currently run pull request
Type: Integer
Example: 1
BUDDY_RUN_PR_TITLE
The title of the currently run pull request
Type: String
Example: Amazing new feature
BUDDY_RUN_PR_DRAFT
Indicates whether the currently run pull request is a draft
Type: Boolean
Example: true
BUDDY_RUN_REF
The branch/tag/pull request or a wildcard string that was used in the pipeline run
Type: String
Example: refs/tags/v1
BUDDY_RUN_REFRESH
Represents whether the files were uploaded from scratch by the deployment actions in the current pipeline run
Type: Boolean
Example: false
BUDDY_RUN_COMMIT
The SHA1 hash of the commit of the current pipeline run
Type: String
Example: 46c360492d6372e5335300776806af412755871
BUDDY_RUN_COMMIT_COMMITTER_EMAIL
The email address of the committer email of the currently run revision
Type: String
Example: mike.benson@buddy.works
BUDDY_RUN_COMMIT_COMMITTER_NAME
The email address of the committer of the currently run revision
Type: String
Example: Mike Benson
BUDDY_RUN_COMMIT_MESSAGE
The commit message of the currently run revision
Type: String
Example: we need to write unit tests!
BUDDY_RUN_COMMIT_SHORT
The short hash of the commit of the current pipeline run
Type: String
Example: 46c3604
BUDDY_RUN_COMMIT_SUBJECT
The commit subject of the currently run revision
Type: String
Example: Bugfix
BUDDY_RUN_COMMIT_URL
The URL of the commit of the current pipeline run
Type: String
Example: https://app.buddy.works/workspace/project/repository/commit/e5e13f8b7f8d5c6096a0501dc09b48eef05fea
BUDDY_RUN_START_DATE
The date of the current pipeline run
Type: String
Example: 2024-01-01T11:27:40.140Z
BUDDY_RUN_STATS_COMMITS
The number of commits pushed since the last run commit
Type: Integer
Example" 20
BUDDY_RUN_START_TIMESTAMP
The starting timestamp of the current pipeline run in UNIX format
Type: Integer
Example: 1706685909
BUDDY__CHANGELOG_TOTAL_COMMITS
The number of commits pushed since the last run revision
Type: Integer
Example: 20
BUDDY_RUN_STATS_FILES
The number of files modified (changed/added/deleted) since the last run revision
Type: Integer
Example: 26
BUDDY_RUN_STATS_FILES_ADDED
The number of files added since the last run revision
Type: Integer
Example: 6
BUDDY_RUN_STATS_FILES_CHANGED
The number of files changed since the last run revision
Type: Integer
Example: 6
BUDDY_RUN_STATS_FILES_DELETED
The number of files deleted since the last run revision
Type: Integer
Example: 8
BUDDY_RUN_TAG
The name of the Git tag of the current pipeline run (provided the run is tagged)
Type: String
Example: v1.0.1
BUDDY_RUN_TIME
The total time of the current pipeline run since the action is triggered (in seconds)
Type: Integer
Example: 69
BUDDY_RUN_URL
The URL of the current pipeline run
Type: String
Example: https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/1/execution/5d9dc42c422f5a268b389
BUDDY_RUN_WARNINGS_COUNT
The total number of warnings that appeared in the current pipeline run
Type: Integer
Example: 3
BUDDY_RUN_WEBHOOK_PAYLOAD
The payload of the webhook that triggered the pipeline
Type: String
Example: { "comment": "my comment", "clearCache": 1 }
BUDDY_FAILED_ACTION_LOGS
The logs from the action that has failed in the current pipeline run (one entry per line)
Type: List
Example: The command '/bin/sh -c test' returned a non-zero code: 127
BUDDY_FAILED_ACTION_NAME
The name of the action that has failed in the current pipeline run
Type: String
Example: Build and test
BUDDY_PIPELINE_CACHE_SIZE_LIMIT_MB
Pipeline filesystem, Docker layers cache, and cached paths size in megabytes
Type: Integer
Example: 20480
BUDDY_PIPELINE_CACHE_SIZE_MB
Pipeline filesystem, Docker layers cache, and cached paths size in megabytes
Type: Integer
Example: 1000
BUDDY_PIPELINE_CACHE_USAGE
Percentage of storage used by Docker layers, pipeline filesystems, and cached paths
Type: Integer
Example: 60
BUDDY_TRIGGERING_ACTOR_AVATAR_URL
The URL of the avatar of the pipeline run invoker
Type: String
Example: https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/05d20f3d58ce09a3b4e9g33/w/32/32/AVATAR.png
BUDDY_TRIGGERING_ACTOR_EMAIL
The email address of the pipeline run invoker
Type: String
Example: mike.benson@buddy.works
BUDDY_TRIGGERING_ACTOR_ID
The ID of the pipeline run invoker
Type: Integer
Example: 1
BUDDY_TRIGGERING_ACTOR
The name of the pipeline run invoker
Type: String
Example: Mike Benson
BUDDY_TRIGGERING_ACTOR_URL
The URL to the profile of the pipeline run invoker
Type: String
Example: https://app.buddy.works/myworkspace/profile/1
BUDDY_APPROVING_ACTOR
The name of the pipeline run's approver
Type: String
Example: Mike Benson
BUDDY_APPROVING_ACTOR_ID
The ID of the pipeline run's approver
Type: Integer
Example: 1
BUDDY_APPROVING_ACTOR_EMAIL
The email address of the pipeline run's approver
Type: String
Example: mike.benson@buddy.works
BUDDY_APPROVING_ACTOR_URL
The URL to the profile of the pipeline run's approver
Type: String
Example: https://app.buddy.works/myworkspace/profile/1
BUDDY_APPROVING_ACTOR_AVATAR_URL
The URL of the avatar of the pipeline run's approver
Type: String
Example: https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/05d20f3d58ce09a3b4e9g33/w/32/32/AVATAR.png
BUDDY_PIPELINE_ID
The ID of the run pipeline
Type: Integer
Example: 1
BUDDY_PIPELINE_NAME
The name of the run pipeline
Type: String
Example: Deploy to Production
BUDDY_PIPELINE_REF_NAME
The branch/tag/pull request or a wildcard string set in the run pipeline
Type: String
Example: refs/tags/v1
BUDDY_PIPELINE_REFS
The list of refs set in the run pipeline
Type: String
Example: refs/heads/branch1,refs/heads/branch2
BUDDY_PIPELINE_PREVIEW_URL
The URL of the server to which the pipeline is deploying
Type: String
Example: https://my-server.com
BUDDY_PIPELINE_TRIGGER_MODE
The trigger mode set in the run pipeline
Type: String
Example: CLICK / EVENT / SCHEDULE
BUDDY_PIPELINE_URL
The URL of the run pipeline
Type: String
Example: https://app.buddy.works/my-workspace/my-project/pipelines/pipeline/1
BUDDY_PROJECT_NAME
The name of the project
Type: String
Example: My project
BUDDY_PROJECT_NAME_ID
The ID of the project
Type: Integer
Example: my-project
BUDDY_PROJECT_URL
The URL of the project
Type: String
Example: https://app.buddy.works/workspace/my-project
BUDDY_REPO_SLUG
The slug of the repository
Type: String
Example: githubaccount/repository
BUDDY_REPO_SSH_URL
The SSH URL of the repository
Type: String
Example: git@github.com:githubaccount/repository
BUDDY_RUN_PR_ASSIGNEES
A comma-separated list of usernames of pull request assignees
Type: String
Example: sztwiorok,bylek
BUDDY_RUN_PR_EVENT
Pull request event that triggered the run
Type: String
Example: assigned
BUDDY_RUN_PR_LABELS
A comma-separated list of labels associated with the pull request
Type: String
Example: bug,docs
BUDDY_RUN_PR_LOCKED
Whether the pull request is locked
Type: String
Example: false
BUDDY_RUN_PR_MILESTONE
The pull request milestone name
Type: String
Example: m1
BUDDY_RUN_PR_REVIEWERS
A comma-separated list of usernames of pull request reviewers
Type: String
Example: sztwiorok,bylek
BUDDY_RUN_PR_STATE
The state of the pull request
Type: String
Example: open
BUDDY_SANDBOX_URL
The URL of the created sandbox
Type: String
Example: https://dev-my-project.buddy.cloud
BUDDY_SCM_PROVIDER
The name of the Git hosting provider synchronized with the project
Type: String
Example: GITHUB / BUDDY / BITBUCKET / GITLAB
BUDDY_SCM_URL
The URL of the repository synchronized with the project
Type: String
Example: https://github.com/githubaccount/repository
BUDDY_SIGNED_IPA_PATH
The path in the pipeline filesystem to which the .ipa file is saved
Type: String
Example: export/signedArchive.ipa
BUDDY_RUNNERS
The JSON with the information about all installed runners
Type: String
Example: {"runners":[{"name":"Primary","address":"build-server","status":"RUNNING","load":0.56,"free_slots":4,"tag":"NOT_TAGGED","locked":false}],"tags":[{"name":"NOT_TAGGED","avg_load":0.56,"free_slots":4,"runners_quantity":1}]}
BUDDY_RUNNERS_IP_${TAG}
The list of IP addresses of runners tagged with ${TAG}
Type: List
Example: build-server,192.168.1.100
BUDDY_RUNNERS_IP_NOT_TAGGED
The list of IP addresses of untagged runners
Type: List
Example: build-server,192.168.1.100
BUDDY_RUNNERS_LOAD_${TAG}
The average load on all runners tagged with ${TAG}
Type: Float
Example: 0.69
BUDDY_RUNNERS_LOAD_NOT_TAGGED
The average load on all untagged runners
Type: Float
Example: 2.03
BUDDY_RUNNERS_CONCURRENT_SLOTS
The total number of concurrent slots across all runners
Type: Integer
Example: 4
BUDDY_RUNNERS_COUNT_${TAG}
The number of runners tagged with ${TAG}
Type: Integer
Example: 1
BUDDY_RUNNERS_COUNT_NOT_TAGGED
The number of untagged runners
Type: Integer
Example: 1
BUDDY_RUNNERS_FREE_NOT_TAGGED
The number of free slots on all untagged runners
Type: Integer
Example: 4
BUDDY_RUNNERS_FREE_${TAG}
The number of free slots on runners tagged with ${TAG}
Type: Integer
Example: 4
BUDDY_WORKSPACE_DOMAIN
The slug of the workspace
Type: String
Example: my-workspace
BUDDY_WORKSPACE_ID
The ID of the workspace
Type: Integer
Example: 1
BUDDY_WORKSPACE_NAME
The name of the workspace
Type: String
Example: My workspace
BUDDY_WORKSPACE_URL
The URL of the workspace
Type: String
Example: https://app.buddy.works/my-workspace
CI
Represents whether the current environment is a non-Buddy CI environment
Type: Boolean
Example: true

Last modified on Nov 19, 2024