From e71f240a31e8c75ebdc118dc29ddc1dbadf02416 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 5 Nov 2026 13:23:38 +0100 Subject: [PATCH] Docs: make builtin env var scopes more descriptive calling the scope just `config` dont work good because from UX perspectife it is all just config right? so rename it to `compile` as it is evaluated at "compile time" fromt the pipeline compiler --- docs/docs/20-usage/50-environment.md | 214 +++++++++++++-------------- 1 file changed, 107 insertions(+), 107 deletions(-) diff --git a/docs/docs/20-usage/50-environment.md b/docs/docs/20-usage/50-environment.md index 16f0c002bb3..7b6d0b78256 100644 --- a/docs/docs/20-usage/50-environment.md +++ b/docs/docs/20-usage/50-environment.md @@ -50,117 +50,117 @@ This is the reference list of all environment variables available to your pipeli The **Scope** column documents when each variable can be used: -- `config`: the variable is available at config-evaluation time, when the pipeline configuration is parsed. It can be referenced in [`when`](./20-workflow-syntax.md#when---conditional-execution) filters and expanded via [string substitution](#string-substitution) (e.g. `${CI_COMMIT_SHA}`). +- `compile`: the variable is available at config-evaluation time, before the pipeline configuration is parsed it is evaluated. It can for example be used [`when`](./20-workflow-syntax.md#when---conditional-execution) filters and expanded via [string substitution](#string-substitution) (e.g. `${CI_COMMIT_SHA}`). - `runtime`: the variable is available as an environment variable inside the running step. Most variables are available in both scopes. Variables scoped only to `runtime` (e.g. the step-specific variables and `CI_PIPELINE_STATUS`) are not populated while the configuration is evaluated, so they cannot be used in `when` filters or substitutions. -| NAME | Scope | Description | Example | -| ---------------------------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | -| `CI` | `config, runtime` | CI environment name | `woodpecker` | -| | | **Repository** | | -| `CI_REPO` | `config, runtime` | repository full name `/` | `john-doe/my-repo` | -| `CI_REPO_OWNER` | `config, runtime` | repository owner | `john-doe` | -| `CI_REPO_NAME` | `config, runtime` | repository name | `my-repo` | -| `CI_REPO_ID` | `config, runtime` | repository ID in Woodpecker | `7` | -| `CI_REPO_REMOTE_ID` | `config, runtime` | repository remote ID, is the UID it has in the forge | `82` | -| `CI_REPO_URL` | `config, runtime` | repository web URL | `https://git.example.com/john-doe/my-repo` | -| `CI_REPO_CLONE_URL` | `config, runtime` | repository clone URL | `https://git.example.com/john-doe/my-repo.git` | -| `CI_REPO_CLONE_SSH_URL` | `config, runtime` | repository SSH clone URL | `git@git.example.com:john-doe/my-repo.git` | -| `CI_REPO_DEFAULT_BRANCH` | `config, runtime` | repository default branch | `main` | -| `CI_REPO_PRIVATE` | `config, runtime` | repository is private | `true` | -| `CI_REPO_TRUSTED_NETWORK` | `config, runtime` | repository has trusted network access | `false` | -| `CI_REPO_TRUSTED_VOLUMES` | `config, runtime` | repository has trusted volumes access | `false` | -| `CI_REPO_TRUSTED_SECURITY` | `config, runtime` | repository has trusted security access | `false` | -| | | **Current Commit** | | -| `CI_COMMIT_SHA` | `config, runtime` | commit SHA | `deadbee...` | -| `CI_COMMIT_REF` | `config, runtime` | commit ref | `refs/heads/main` | -| `CI_COMMIT_REFSPEC` | `config, runtime` | commit ref spec | `issue-branch:main` | -| `CI_COMMIT_BRANCH` | `config, runtime` | commit branch (equals target branch for pull requests) | `main` | -| `CI_COMMIT_SOURCE_BRANCH` | `config, runtime` | commit source branch (set only for pull request events) | `issue-branch` | -| `CI_COMMIT_TARGET_BRANCH` | `config, runtime` | commit target branch (set only for pull request events) | `main` | -| `CI_COMMIT_TAG` | `config, runtime` | commit tag name (empty if event is not `tag`) | `v1.10.3` | -| `CI_COMMIT_PULL_REQUEST` | `config, runtime` | commit pull request number (set only for pull request events) | `1` | -| `CI_COMMIT_PULL_REQUEST_LABELS` | `config, runtime` | labels assigned to pull request (set only for pull request events) | `server` | -| `CI_COMMIT_PULL_REQUEST_MILESTONE` | `config, runtime` | milestone assigned to pull request (set only for `pull_request` and `pull_request_closed` events) | `summer-sprint` | -| `CI_COMMIT_PULL_REQUEST_DRAFT` | `config, runtime` | whether the pull request is a draft (set only for pull request events; see [forge support](#ci_commit_pull_request_draft-forge-support)) | `true`, `false` | -| `CI_COMMIT_MESSAGE` | `config, runtime` | commit message | `Initial commit` | -| `CI_COMMIT_TIMESTAMP` | `config, runtime` | commit UNIX timestamp | `1722617519` | -| `CI_COMMIT_AUTHOR` | `config, runtime` | commit author username | `john-doe` | -| `CI_COMMIT_AUTHOR_EMAIL` | `config, runtime` | commit author email address | `john-doe@example.com` | -| `CI_COMMIT_PRERELEASE` | `config, runtime` | release is a pre-release (empty if event is not `release`) — **deprecated**, use `CI_PIPELINE_RELEASE_PRE` | `false` | -| | | **Current pipeline** | | -| `CI_PIPELINE_NUMBER` | `config, runtime` | pipeline number | `8` | -| `CI_PIPELINE_PARENT` | `config, runtime` | number of parent pipeline | `0` | -| `CI_PIPELINE_STATUS` | `runtime` | state of the workflow right before the step was started | `success`, `failure` | -| `CI_PIPELINE_EVENT` | `config, runtime` | pipeline event (see [`event`](../20-usage/20-workflow-syntax.md#event)) | `push`
`pull_request`
`pull_request_closed`
`pull_request_metadata`
`tag`
`release`
`manual`
`cron` | -| `CI_PIPELINE_EVENT_REASON` | `config, runtime` | exact reason why `pull_request_metadata` event was send. it is forge instance specific and can change | `label_updated`
`milestoned`
`demilestoned`
`assigned`
`edited`
... | -| `CI_PIPELINE_URL` | `config, runtime` | link to the web UI for the pipeline | `https://ci.example.com/repos/7/pipeline/8` | -| `CI_PIPELINE_FORGE_URL` | `config, runtime` | link to the forge's web UI for the commit(s) or tag that triggered the pipeline | `https://git.example.com/john-doe/my-repo/commit/deadbee...` | -| `CI_PIPELINE_DEPLOY_TARGET` | `config, runtime` | pipeline deploy target for `deployment` events | `production` | -| `CI_PIPELINE_DEPLOY_TASK` | `config, runtime` | pipeline deploy task for `deployment` events | `migration` | -| `CI_PIPELINE_RELEASE_TITLE` | `config, runtime` | release title (empty if event is not `release`) | `v1.10.3` | -| `CI_PIPELINE_RELEASE_PRE` | `config, runtime` | release is a pre-release (empty if event is not `release`) | `false` | -| `CI_PIPELINE_CREATED` | `config, runtime` | pipeline created UNIX timestamp | `1722617519` | -| `CI_PIPELINE_STARTED` | `config, runtime` | pipeline started UNIX timestamp | `1722617519` | -| `CI_PIPELINE_FILES` | `config, runtime` | changed files (empty if event is not `push` or `pull_request`), it is undefined if more than 500 files are touched | `[]`, `[".woodpecker.yml","README.md"]` | -| `CI_PIPELINE_AUTHOR` | `config, runtime` | pipeline author username | `octocat` | -| `CI_PIPELINE_AVATAR` | `config, runtime` | pipeline author avatar | `https://git.example.com/avatars/5dcbcadbce6f87f8abef` | -| `CI_PIPELINE_RERUNS` | `config, runtime` | number of times the pipeline has been restarted; not set on the initial run, `1` after the first restart, incremented on each subsequent restart | `1` | -| | | **Current workflow** | | -| `CI_WORKFLOW_NAME` | `config, runtime` | workflow name | `release` | -| | | **Current step** | | -| `CI_STEP_NAME` | `runtime` | step name | `build package` | -| `CI_STEP_TYPE` | `runtime` | step type (`commands`, `plugin`, `service`, `clone` or `cache`) | `commands` | -| `CI_STEP_NUMBER` | `runtime` | step number | `0` | -| `CI_STEP_STARTED` | `runtime` | step started UNIX timestamp | `1722617519` | -| `CI_STEP_URL` | `runtime` | URL to step in UI | `https://ci.example.com/repos/7/pipeline/8` | -| | | **Previous commit** | | -| `CI_PREV_COMMIT_SHA` | `config, runtime` | previous commit SHA | `deadbee...` | -| `CI_PREV_COMMIT_REF` | `config, runtime` | previous commit ref | `refs/heads/main` | -| `CI_PREV_COMMIT_REFSPEC` | `config, runtime` | previous commit ref spec | `issue-branch:main` | -| `CI_PREV_COMMIT_BRANCH` | `config, runtime` | previous commit branch | `main` | -| `CI_PREV_COMMIT_SOURCE_BRANCH` | `config, runtime` | previous commit source branch (set only for pull request events) | `issue-branch` | -| `CI_PREV_COMMIT_TARGET_BRANCH` | `config, runtime` | previous commit target branch (set only for pull request events) | `main` | -| `CI_PREV_COMMIT_URL` | `config, runtime` | previous commit link in forge | `https://git.example.com/john-doe/my-repo/commit/deadbee...` | -| `CI_PREV_COMMIT_MESSAGE` | `config, runtime` | previous commit message | `test` | -| `CI_PREV_COMMIT_TIMESTAMP` | `config, runtime` | previous commit UNIX timestamp | `1722617519` | -| `CI_PREV_COMMIT_AUTHOR` | `config, runtime` | previous commit author username | `john-doe` | -| `CI_PREV_COMMIT_AUTHOR_EMAIL` | `config, runtime` | previous commit author email address | `john-doe@example.com` | -| | | **Previous pipeline** | | -| `CI_PREV_PIPELINE_NUMBER` | `config, runtime` | previous pipeline number | `7` | -| `CI_PREV_PIPELINE_PARENT` | `config, runtime` | previous pipeline number of parent pipeline | `0` | -| `CI_PREV_PIPELINE_EVENT` | `config, runtime` | previous pipeline event (see [`event`](../20-usage/20-workflow-syntax.md#event)) | `push`
`pull_request`
`pull_request_closed`
`pull_request_metadata`
`tag`
`release`
`manual`
`cron` | -| `CI_PREV_PIPELINE_EVENT_REASON` | `config, runtime` | previous exact reason `pull_request_metadata` event was send. it is forge instance specific and can change | `label_updated`
`milestoned`
`demilestoned`
`assigned`
`edited`
... | -| `CI_PREV_PIPELINE_URL` | `config, runtime` | previous pipeline link in CI | `https://ci.example.com/repos/7/pipeline/7` | -| `CI_PREV_PIPELINE_FORGE_URL` | `config, runtime` | previous pipeline link to event in forge | `https://git.example.com/john-doe/my-repo/commit/deadbee...` | -| `CI_PREV_PIPELINE_DEPLOY_TARGET` | `config, runtime` | previous pipeline deploy target for `deployment` events | `production` | -| `CI_PREV_PIPELINE_DEPLOY_TASK` | `config, runtime` | previous pipeline deploy task for `deployment` events | `migration` | -| `CI_PREV_PIPELINE_STATUS` | `config, runtime` | previous pipeline status | `success`, `failure` | -| `CI_PREV_PIPELINE_CREATED` | `config, runtime` | previous pipeline created UNIX timestamp | `1722610173` | -| `CI_PREV_PIPELINE_STARTED` | `config, runtime` | previous pipeline started UNIX timestamp | `1722610173` | -| `CI_PREV_PIPELINE_FINISHED` | `config, runtime` | previous pipeline finished UNIX timestamp | `1722610383` | -| `CI_PREV_PIPELINE_AUTHOR` | `config, runtime` | previous pipeline author username | `octocat` | -| `CI_PREV_PIPELINE_AVATAR` | `config, runtime` | previous pipeline author avatar | `https://git.example.com/avatars/5dcbcadbce6f87f8abef` | -| | |   | | -| `CI_WORKSPACE` | `runtime` | Path of the workspace where source code gets cloned to | `/woodpecker/src/git.example.com/john-doe/my-repo` | -| | | **System** | | -| `CI_SYSTEM_NAME` | `config, runtime` | name of the CI system | `woodpecker` | -| `CI_SYSTEM_URL` | `config, runtime` | link to CI system | `https://ci.example.com` | -| `CI_SYSTEM_HOST` | `config, runtime` | hostname of CI server | `ci.example.com` | -| `CI_SYSTEM_VERSION` | `config, runtime` | version of the server | `2.7.0` | -| | | **Agent** | | -| `CI_AGENT_ID` | `runtime` | ID of the agent running the step | `3` | -| `CI_AGENT_LABELS` | `runtime` | labels of the agent running the step, as a JSON object with keys sorted | `{"backend":"docker","hostname":"agent-1","platform":"linux/amd64","repo":"*"}` | -| | | **Forge** | | -| `CI_FORGE_TYPE` | `config, runtime` | name of forge | `bitbucket`
`bitbucket_dc`
`forgejo`
`gitea`
`github`
`gitlab` | -| `CI_FORGE_URL` | `config, runtime` | root URL of configured forge | `https://git.example.com` | -| `CI_FORGE_HOST` | `config, runtime` | hostname of configured forge | `git.example.com` | -| | | **Internal** - Please don't use! | | -| `CI_SCRIPT` | `runtime` | Internal script path. Used to call pipeline step commands. | | -| `CI_NETRC_USERNAME` | `runtime` | Credentials for private repos to be able to clone data. (Only available for specific images) | | -| `CI_NETRC_PASSWORD` | `runtime` | Credentials for private repos to be able to clone data. (Only available for specific images) | | -| `CI_NETRC_MACHINE` | `runtime` | Credentials for private repos to be able to clone data. (Only available for specific images) | | +| NAME | Scope | Description | Example | +| ---------------------------------- | ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------- | +| `CI` | `compile, runtime` | CI environment name | `woodpecker` | +| | | **Repository** | | +| `CI_REPO` | `compile, runtime` | repository full name `/` | `john-doe/my-repo` | +| `CI_REPO_OWNER` | `compile, runtime` | repository owner | `john-doe` | +| `CI_REPO_NAME` | `compile, runtime` | repository name | `my-repo` | +| `CI_REPO_ID` | `compile, runtime` | repository ID in Woodpecker | `7` | +| `CI_REPO_REMOTE_ID` | `compile, runtime` | repository remote ID, is the UID it has in the forge | `82` | +| `CI_REPO_URL` | `compile, runtime` | repository web URL | `https://git.example.com/john-doe/my-repo` | +| `CI_REPO_CLONE_URL` | `compile, runtime` | repository clone URL | `https://git.example.com/john-doe/my-repo.git` | +| `CI_REPO_CLONE_SSH_URL` | `compile, runtime` | repository SSH clone URL | `git@git.example.com:john-doe/my-repo.git` | +| `CI_REPO_DEFAULT_BRANCH` | `compile, runtime` | repository default branch | `main` | +| `CI_REPO_PRIVATE` | `compile, runtime` | repository is private | `true` | +| `CI_REPO_TRUSTED_NETWORK` | `compile, runtime` | repository has trusted network access | `false` | +| `CI_REPO_TRUSTED_VOLUMES` | `compile, runtime` | repository has trusted volumes access | `false` | +| `CI_REPO_TRUSTED_SECURITY` | `compile, runtime` | repository has trusted security access | `false` | +| | | **Current Commit** | | +| `CI_COMMIT_SHA` | `compile, runtime` | commit SHA | `deadbee...` | +| `CI_COMMIT_REF` | `compile, runtime` | commit ref | `refs/heads/main` | +| `CI_COMMIT_REFSPEC` | `compile, runtime` | commit ref spec | `issue-branch:main` | +| `CI_COMMIT_BRANCH` | `compile, runtime` | commit branch (equals target branch for pull requests) | `main` | +| `CI_COMMIT_SOURCE_BRANCH` | `compile, runtime` | commit source branch (set only for pull request events) | `issue-branch` | +| `CI_COMMIT_TARGET_BRANCH` | `compile, runtime` | commit target branch (set only for pull request events) | `main` | +| `CI_COMMIT_TAG` | `compile, runtime` | commit tag name (empty if event is not `tag`) | `v1.10.3` | +| `CI_COMMIT_PULL_REQUEST` | `compile, runtime` | commit pull request number (set only for pull request events) | `1` | +| `CI_COMMIT_PULL_REQUEST_LABELS` | `compile, runtime` | labels assigned to pull request (set only for pull request events) | `server` | +| `CI_COMMIT_PULL_REQUEST_MILESTONE` | `compile, runtime` | milestone assigned to pull request (set only for `pull_request` and `pull_request_closed` events) | `summer-sprint` | +| `CI_COMMIT_PULL_REQUEST_DRAFT` | `compile, runtime` | whether the pull request is a draft (set only for pull request events; see [forge support](#ci_commit_pull_request_draft-forge-support)) | `true`, `false` | +| `CI_COMMIT_MESSAGE` | `compile, runtime` | commit message | `Initial commit` | +| `CI_COMMIT_TIMESTAMP` | `compile, runtime` | commit UNIX timestamp | `1722617519` | +| `CI_COMMIT_AUTHOR` | `compile, runtime` | commit author username | `john-doe` | +| `CI_COMMIT_AUTHOR_EMAIL` | `compile, runtime` | commit author email address | `john-doe@example.com` | +| `CI_COMMIT_PRERELEASE` | `compile, runtime` | release is a pre-release (empty if event is not `release`) — **deprecated**, use `CI_PIPELINE_RELEASE_PRE` | `false` | +| | | **Current pipeline** | | +| `CI_PIPELINE_NUMBER` | `compile, runtime` | pipeline number | `8` | +| `CI_PIPELINE_PARENT` | `compile, runtime` | number of parent pipeline | `0` | +| `CI_PIPELINE_STATUS` | `runtime` | state of the workflow right before the step was started | `success`, `failure` | +| `CI_PIPELINE_EVENT` | `compile, runtime` | pipeline event (see [`event`](../20-usage/20-workflow-syntax.md#event)) | `push`
`pull_request`
`pull_request_closed`
`pull_request_metadata`
`tag`
`release`
`manual`
`cron` | +| `CI_PIPELINE_EVENT_REASON` | `compile, runtime` | exact reason why `pull_request_metadata` event was send. it is forge instance specific and can change | `label_updated`
`milestoned`
`demilestoned`
`assigned`
`edited`
... | +| `CI_PIPELINE_URL` | `compile, runtime` | link to the web UI for the pipeline | `https://ci.example.com/repos/7/pipeline/8` | +| `CI_PIPELINE_FORGE_URL` | `compile, runtime` | link to the forge's web UI for the commit(s) or tag that triggered the pipeline | `https://git.example.com/john-doe/my-repo/commit/deadbee...` | +| `CI_PIPELINE_DEPLOY_TARGET` | `compile, runtime` | pipeline deploy target for `deployment` events | `production` | +| `CI_PIPELINE_DEPLOY_TASK` | `compile, runtime` | pipeline deploy task for `deployment` events | `migration` | +| `CI_PIPELINE_RELEASE_TITLE` | `compile, runtime` | release title (empty if event is not `release`) | `v1.10.3` | +| `CI_PIPELINE_RELEASE_PRE` | `compile, runtime` | release is a pre-release (empty if event is not `release`) | `false` | +| `CI_PIPELINE_CREATED` | `compile, runtime` | pipeline created UNIX timestamp | `1722617519` | +| `CI_PIPELINE_STARTED` | `compile, runtime` | pipeline started UNIX timestamp | `1722617519` | +| `CI_PIPELINE_FILES` | `compile, runtime` | changed files (empty if event is not `push` or `pull_request`), it is undefined if more than 500 files are touched | `[]`, `[".woodpecker.yml","README.md"]` | +| `CI_PIPELINE_AUTHOR` | `compile, runtime` | pipeline author username | `octocat` | +| `CI_PIPELINE_AVATAR` | `compile, runtime` | pipeline author avatar | `https://git.example.com/avatars/5dcbcadbce6f87f8abef` | +| `CI_PIPELINE_RERUNS` | `compile, runtime` | number of times the pipeline has been restarted; not set on the initial run, `1` after the first restart, incremented on each subsequent restart | `1` | +| | | **Current workflow** | | +| `CI_WORKFLOW_NAME` | `compile, runtime` | workflow name | `release` | +| | | **Current step** | | +| `CI_STEP_NAME` | `runtime` | step name | `build package` | +| `CI_STEP_TYPE` | `runtime` | step type (`commands`, `plugin`, `service`, `clone` or `cache`) | `commands` | +| `CI_STEP_NUMBER` | `runtime` | step number | `0` | +| `CI_STEP_STARTED` | `runtime` | step started UNIX timestamp | `1722617519` | +| `CI_STEP_URL` | `runtime` | URL to step in UI | `https://ci.example.com/repos/7/pipeline/8` | +| | | **Previous commit** | | +| `CI_PREV_COMMIT_SHA` | `compile, runtime` | previous commit SHA | `deadbee...` | +| `CI_PREV_COMMIT_REF` | `compile, runtime` | previous commit ref | `refs/heads/main` | +| `CI_PREV_COMMIT_REFSPEC` | `compile, runtime` | previous commit ref spec | `issue-branch:main` | +| `CI_PREV_COMMIT_BRANCH` | `compile, runtime` | previous commit branch | `main` | +| `CI_PREV_COMMIT_SOURCE_BRANCH` | `compile, runtime` | previous commit source branch (set only for pull request events) | `issue-branch` | +| `CI_PREV_COMMIT_TARGET_BRANCH` | `compile, runtime` | previous commit target branch (set only for pull request events) | `main` | +| `CI_PREV_COMMIT_URL` | `compile, runtime` | previous commit link in forge | `https://git.example.com/john-doe/my-repo/commit/deadbee...` | +| `CI_PREV_COMMIT_MESSAGE` | `compile, runtime` | previous commit message | `test` | +| `CI_PREV_COMMIT_TIMESTAMP` | `compile, runtime` | previous commit UNIX timestamp | `1722617519` | +| `CI_PREV_COMMIT_AUTHOR` | `compile, runtime` | previous commit author username | `john-doe` | +| `CI_PREV_COMMIT_AUTHOR_EMAIL` | `compile, runtime` | previous commit author email address | `john-doe@example.com` | +| | | **Previous pipeline** | | +| `CI_PREV_PIPELINE_NUMBER` | `compile, runtime` | previous pipeline number | `7` | +| `CI_PREV_PIPELINE_PARENT` | `compile, runtime` | previous pipeline number of parent pipeline | `0` | +| `CI_PREV_PIPELINE_EVENT` | `compile, runtime` | previous pipeline event (see [`event`](../20-usage/20-workflow-syntax.md#event)) | `push`
`pull_request`
`pull_request_closed`
`pull_request_metadata`
`tag`
`release`
`manual`
`cron` | +| `CI_PREV_PIPELINE_EVENT_REASON` | `compile, runtime` | previous exact reason `pull_request_metadata` event was send. it is forge instance specific and can change | `label_updated`
`milestoned`
`demilestoned`
`assigned`
`edited`
... | +| `CI_PREV_PIPELINE_URL` | `compile, runtime` | previous pipeline link in CI | `https://ci.example.com/repos/7/pipeline/7` | +| `CI_PREV_PIPELINE_FORGE_URL` | `compile, runtime` | previous pipeline link to event in forge | `https://git.example.com/john-doe/my-repo/commit/deadbee...` | +| `CI_PREV_PIPELINE_DEPLOY_TARGET` | `compile, runtime` | previous pipeline deploy target for `deployment` events | `production` | +| `CI_PREV_PIPELINE_DEPLOY_TASK` | `compile, runtime` | previous pipeline deploy task for `deployment` events | `migration` | +| `CI_PREV_PIPELINE_STATUS` | `compile, runtime` | previous pipeline status | `success`, `failure` | +| `CI_PREV_PIPELINE_CREATED` | `compile, runtime` | previous pipeline created UNIX timestamp | `1722610173` | +| `CI_PREV_PIPELINE_STARTED` | `compile, runtime` | previous pipeline started UNIX timestamp | `1722610173` | +| `CI_PREV_PIPELINE_FINISHED` | `compile, runtime` | previous pipeline finished UNIX timestamp | `1722610383` | +| `CI_PREV_PIPELINE_AUTHOR` | `compile, runtime` | previous pipeline author username | `octocat` | +| `CI_PREV_PIPELINE_AVATAR` | `compile, runtime` | previous pipeline author avatar | `https://git.example.com/avatars/5dcbcadbce6f87f8abef` | +| | |   | | +| `CI_WORKSPACE` | `runtime` | Path of the workspace where source code gets cloned to | `/woodpecker/src/git.example.com/john-doe/my-repo` | +| | | **System** | | +| `CI_SYSTEM_NAME` | `compile, runtime` | name of the CI system | `woodpecker` | +| `CI_SYSTEM_URL` | `compile, runtime` | link to CI system | `https://ci.example.com` | +| `CI_SYSTEM_HOST` | `compile, runtime` | hostname of CI server | `ci.example.com` | +| `CI_SYSTEM_VERSION` | `compile, runtime` | version of the server | `2.7.0` | +| | | **Agent** | | +| `CI_AGENT_ID` | `runtime` | ID of the agent running the step | `3` | +| `CI_AGENT_LABELS` | `runtime` | labels of the agent running the step, as a JSON object with keys sorted | `{"backend":"docker","hostname":"agent-1","platform":"linux/amd64","repo":"*"}` | +| | | **Forge** | | +| `CI_FORGE_TYPE` | `compile, runtime` | name of forge | `bitbucket`
`bitbucket_dc`
`forgejo`
`gitea`
`github`
`gitlab` | +| `CI_FORGE_URL` | `compile, runtime` | root URL of configured forge | `https://git.example.com` | +| `CI_FORGE_HOST` | `compile, runtime` | hostname of configured forge | `git.example.com` | +| | | **Internal** - Please don't use! | | +| `CI_SCRIPT` | `runtime` | Internal script path. Used to call pipeline step commands. | | +| `CI_NETRC_USERNAME` | `runtime` | Credentials for private repos to be able to clone data. (Only available for specific images) | | +| `CI_NETRC_PASSWORD` | `runtime` | Credentials for private repos to be able to clone data. (Only available for specific images) | | +| `CI_NETRC_MACHINE` | `runtime` | Credentials for private repos to be able to clone data. (Only available for specific images) | | ## Global environment variables