Skip to content

Commit

Permalink
add docs for CIRRUS_CLONE_TAGS (#1273)
Browse files Browse the repository at this point in the history
* add docs for `CIRRUS_CLONE_TAGS`

* remove stupid whitespace changes

* fix naming

* add CIRRUS_CLONE_TAGS to .spelling
  • Loading branch information
bartekpacia committed Apr 4, 2024
1 parent f69dfad commit b5dc523
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ CIRRUS_CHANGE_MESSAGE
CIRRUS_CHANGE_TITLE
CIRRUS_CI
CIRRUS_CLONE_DEPTH
CIRRUS_CLONE_TAGS
CIRRUS_CLONE_SUBMODULES
CIRRUS_CPU
CIRRUS_CRON
Expand Down
12 changes: 11 additions & 1 deletion docs/guide/tips-and-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,17 @@ task:
# ...
```

In addition if you need to use Git tags, you can add the following script to populate this information:
In addition if you need to use Git tags, set `CIRRUS_CLONE_TAGS` environment variable to `true`:

```yaml
build_task:
environment:
CIRRUS_CLONE_TAGS: true
fetch_deps_script: ...
```
You can also use the script below, but note that it requires `git` to be present
in the container:

```yaml
task:
Expand Down
1 change: 1 addition & 0 deletions docs/guide/writing-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,7 @@ And some environment variables can be set to control behavior of the Cirrus CI A
| CIRRUS_AGENT_VERSION | not set | Cirrus Agent version to use. If not set, the [latest release](https://github.com/cirruslabs/cirrus-ci-agent/releases) |
| CIRRUS_AGENT_EXPOSE_SCRIPTS_OUTPUTS | not set | If set, instructs Cirrus Agent to stream scripts outputs to the console as well as Cirrus API. Useful in case your Kubernetes cluster has logging collection enabled. |
| CIRRUS_CLONE_DEPTH | `0` which will reflect in a full clone of a single branch | Clone depth. |
| CIRRUS_CLONE_TAGS | `false` which will not fetch any tags | Whether to fetch git tags. |
| CIRRUS_CLONE_SUBMODULES | `false` | Set to `true` to clone submodules recursively. |
| CIRRUS_LOG_TIMESTAMP | `false` | Indicate Cirrus Agent to prepend timestamp to each line of logs. |
| CIRRUS_OIDC_TOKEN_AUDIENCE | not set | Allows to override `aud` claim for `CIRRUS_OIDC_TOKEN`. |
Expand Down

0 comments on commit b5dc523

Please sign in to comment.