Quick Start¶
This guide gets you from zero to a published Allure report behind CloudFront.
New here? See the Onboarding Checklist on the home page for prerequisites before running these steps.
1. Install¶
pip install pytest-allure-host allure-pytest
brew install allure # macOS (or see Architecture page for other OS install)
java -version # ensure a JRE/JDK is present for the Allure CLI
2. Produce Allure Results¶
With pytest:
3. Minimal AWS Setup¶
- Private S3 bucket (example
my-allure-reports) - CloudFront distribution (Origin Access Control → bucket)
- Bucket policy allows CloudFront distribution
GetObject - Publisher IAM: Put/Get/List on
reports/prefix (see IAM page)
Quick setup via Infra CLI (from the wheel):
# Optional: safe preflight (no changes)
allurehost-infra-precheck
# Provision S3 + CloudFront (writes .infra_env)
allurehost-infra-setup \
--bucket my-allure-reports \
--region us-east-1 \
--yes
# Export discovered values (BUCKET, CF_DOMAIN, etc.)
source .infra_env
# Optional: validate
allurehost-infra-validate
"Zero-flags" publishing: setup also writes a config file `allure-host.yml`, so you can run with minimal arguments (or none) from the project root.
```bash
# Minimal dry run using generated config and sourced env
source .infra_env && publish-allure --check --dry-run
# Real publish (no flags if allure-host.yml has bucket/project/branch/cloudfront)
source .infra_env && publish-allure
See the [Infra CLI guide](dev/setup_awscli.md) for details, or the read-only [CDK reference](https://github.com/darrenrabbs/allurehosting-cdk) if you prefer IaC.
## 4. Publish via CLI
```bash
publish-allure \
--bucket my-allure-reports \
--project demo \
--branch main \
--cloudfront https://dxxxxx.cloudfront.net
If you used the Infra CLI above (explicit flags alternative):
source .infra_env && publish-allure \
--bucket "$BUCKET" \
--project demo \
--branch main \
--cloudfront "https://$CF_DOMAIN"
Dry run first:
First publish checklist (one-time infra confirmation):
| Item | Command / Note |
|---|---|
| Bucket exists & private | aws s3api get-bucket-location --bucket my-allure-reports |
| Block Public Access on | S3 console or aws s3api get-public-access-block |
| CloudFront OAC attached | Distribution Origin settings |
| Bucket policy updated | Contains distribution ARN condition |
| Dry run passes | publish-allure ... --check --dry-run |
5. View URLs¶
The command prints:
- Run URL (immutable)
- Latest URL (moving pointer)
6. Pytest Plugin Alternative¶
pytest \
--allure-bucket my-allure-reports \
--allure-project demo \
--allure-branch main \
--allure-cloudfront https://dxxxxx.cloudfront.net \
--alluredir allure-results
7. Add Retention / TTL (Optional)¶
8. Context URL (e.g. PR / Ticket)¶
9. Troubleshooting Quick List¶
| Issue | Fix |
|---|---|
| No trends | Ensure previous run existed (first run has none) |
| 403 via CloudFront | Bucket policy missing distribution ARN / OAC not attached |
| Missing Allure CLI | Install allure or include allure-pytest plugin |
| Stale latest | A failed promote step; re-run publish |
| HTTP 301 on fetch | Region mismatch; confirm bucket region |
| CORS errors (XHR) | Add CORS config if embedding widgets cross-origin |
For deeper detail see: CLI & Plugin, IAM, CI Integration.
LocalStack Dry Run¶
awslocal s3 mb s3://local-bucket || true
publish-allure --bucket local-bucket --project demo --branch main \
--s3-endpoint http://localhost:4566 --cloudfront https://localhost.localdomain --dry-run
Windows Note¶
Use forward slashes in config files (e.g. allure-results) and avoid drive letters inside S3 key derivations—paths are normalized internally.
Next Steps¶
Automate in CI: continue to CI Integration or see architectural context in Architecture.