What's Changed
🚀 Features
-
Git Flow context for new launches. allurectl can now send the git context of a run (repository, branch, commit, first-parent commit history and pull request) when it creates a new Allure TestOps launch. The feature is off by default.
Supported commands:
watch,upload,job-run startandlaunch create. The context is sent only when a new launch is created; uploads to an existing launch (--launch-id/ALLURE_LAUNCH_ID) do not send it.Requires Allure TestOps 26.3.1 or later.
Enabling
| CLI flag | Environment variable | Default | Description |
|---|---|---|---|
--git-flow
| ALLURE_GIT_FLOW
| false
| Turns on the Git Flow context. Either the flag or the variable is enough. The variable accepts true/false, 1/0, yes/no.
|
--git-ancestor-limit
| ALLURE_GIT_ANCESTOR_LIMIT
| 100
| Maximum number of first-parent commits sent with the context. The flag overrides the variable; 0 means "use the variable or the default".
|
allurectl watch --git-flow -- ./gradlew testAutomatic detection
Repository, branch, commit and pull request data are read from the CI environment for GitHub Actions, GitLab CI, Azure Pipelines, Jenkins, Bitbucket Pipelines, AWS CodeBuild, Drone and CircleCI, and from the local git repository. When CI does not provide the repository, it is taken from the origin remote, so the feature also works in other CI systems and on a developer machine.
- In a shallow clone, allurectl deepens the history with
git fetch --deepento collect the commit history. It does not change the clone into a partial clone. - Git commands have a timeout and never wait for credentials.
- On GitHub pull requests, the commit is the pull request head, not the temporary merge commit.
- Tag builds are never reported as branches.
- A pull request without a known source or target branch (for example, a branch build with an open merge request) is reported as a branch.
- Repository and pull request links are built for GitHub, GitLab and Bitbucket.
Fine-tuning with environment variables
These variables take priority over CI detection and the local git repository. Use them when your CI system is not detected or reports wrong values.
| Variable | Purpose |
|---|---|
ALLURE_CI_GIT_PROVIDER
| Git provider: github, gitlab, bitbucket or other
|
ALLURE_CI_REPOSITORY_URL
| Repository URL. When the slug or provider variables are not set, they are derived from this URL. |
ALLURE_CI_REPOSITORY_SLUG
| Repository slug, for example org/repo
|
ALLURE_CI_REPO_NAME
| Repository display name. Defaults to the slug. |
ALLURE_CI_SOURCE_BRANCH
| Source branch (the branch of the build or the head branch of a pull request) |
ALLURE_CI_TARGET_BRANCH
| Target branch of a pull request |
ALLURE_CI_COMMIT
| Commit hash. Works without a local git CLI. |
ALLURE_CI_FIRST_PARENT_ANCESTORS
| Comma-separated first-parent commit hashes |
ALLURE_CI_PULL_REQUEST_ID
| Pull request number |
ALLURE_CI_PULL_REQUEST_URL
| Pull request URL. When the number is not set, it is derived from GitHub, GitLab and Bitbucket URLs. |
ALLURE_CI_PULL_REQUEST_TITLE
| Pull request title |
ALLURE_JOB_RUN_BRANCH
| General job run branch; also used as the last fallback for the Git Flow branch |
Error handling
Git Flow never stops a run. If the git context cannot be collected (no git CLI, no repository, unknown provider), the launch is created without it and a warning is logged. Invalid values of ALLURE_GIT_FLOW and ALLURE_GIT_ANCESTOR_LIMIT are ignored.
To see why git commands fail, set ALLURE_DEBUG=true and run allurectl with --log DEBUG.