Upload your report to a file storage of your choice.
gem install allure-report-uploader
docker pull andrcuns/allure-report-publisher:latest
$ (allure-report-publisher|docker run --rm andrcuns/allure-report-publisher:latest) upload --help
Command:
allure-report-publisher upload
Usage:
allure-report-publisher upload TYPE
Description:
Generate and upload allure report
Arguments:
TYPE # REQUIRED Cloud storage type: (s3/gcs)
Options:
--results-glob=VALUE # Allure results files glob. Required: true
--bucket=VALUE # Bucket name. Required: true
--prefix=VALUE # Optional prefix for report path. Required: false
--update-pr=VALUE # Add report url to PR via comment or description update. Required: false: (comment/description)
--[no-]copy-latest # Keep copy of latest report at base prefix path, default: false
--[no-]color # Toggle color output, default: false
--[no-]ignore-missing-results # Ignore missing allure results, default: false
--help, -h # Print this help
Examples:
allure-report-publisher upload s3 --results-glob='path/to/allure-result/**/*' --bucket=my-bucket
allure-report-publisher upload gcs --results-glob='path/to/allure-result/**/*' --bucket=my-bucket --prefix=my-project/prs
Multiple cloud storage providers are supported
Requires environment variables AWS_ACCESS_KEY_ID
, AWS_SECRET_ACCESS_KEY
or credentials file ~/.aws/credentials
Additional configuration:
AWS_REGION
: configure s3 region, default:us-east-1
AWS_FORCE_PATH_STYLE
: when set to true, the bucket name is always left in the request URI and never moved to the host as a sub-domain, default:false
AWS_ENDPOINT
: custom s3 endpoint when used with other s3 compatible storage
Requires on of the following environment variables.
credentials.json file location:
STORAGE_CREDENTIALS
STORAGE_KEYFILE
GOOGLE_CLOUD_CREDENTIALS
GOOGLE_CLOUD_KEYFILE
GCLOUD_KEYFILE
credentials.json contents:
GOOGLE_CLOUD_CREDENTIALS_JSON
STORAGE_CREDENTIALS_JSON
STORAGE_KEYFILE_JSON
GOOGLE_CLOUD_CREDENTIALS_JSON
GOOGLE_CLOUD_KEYFILE_JSON
GCLOUD_KEYFILE_JSON
allure-report-publisher
will automatically detect if used in CI environment and add relevant executor info and history.
Following CI providers are supported:
- Github Actions
- Gitlab CI
It is possible to update pull requests with urls to published reports.
--update-pr=(comment|description)
: post report urls in pr description or as a comment
Example:
# Allure report
allure-report-publisher
generated test report for 1b756f48!
rspec: 📝 test report
Additional configuration is done via environment variables
Authentication for PR updates:
GITHUB_AUTH_TOKEN
: github auth token with api access
Following environment variables can override default CI values:
ALLURE_JOB_NAME
: overrides defaultGITHUB_JOB
value which is used as name for report url section
Additional configuration is done via environment variables
Authentication for MR updates:
GITLAB_AUTH_TOKEN
: gitlab access token with api access
Following environment variables can override default CI values:
ALLURE_JOB_NAME
: overrides defaultCI_JOB_NAME
value which is used as name for report url section
In case merge request triggers a downstream pipeline yet you want to update original merge request, overriding following environment variables might be useful:
ALLURE_PROJECT_PATH
: overrides defaultCI_PROJECT_PATH
valueALLURE_MERGE_REQUEST_IID
: overrides defaultCI_MERGE_REQUEST_IID
valueALLURE_COMMIT_SHA
: overrides defaultCI_MERGE_REQUEST_SOURCE_BRANCH_SHA
orCI_COMMIT_SHA
values
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
.
Bug reports and pull requests are welcome on GitHub at https://github.com/andrcuns/allure-report-publisher. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
The gem is available as open source under the terms of the MIT License.
Everyone interacting in the allure-report-publisher project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.