Other CI Providers¶
The Drape CLI auto-detects context from most CI providers. Install the CLI and run your upload commands — the branch, SHA, and PR number are detected automatically.
CircleCI¶
# .circleci/config.yml
jobs:
test:
docker:
- image: cimg/python:3.12
steps:
- checkout
- run:
name: Run tests
command: pytest --junitxml=results.xml
- run:
name: Upload to Drape
command: |
curl -sL https://github.com/drape-io/drape-cli/releases/latest/download/drape_linux_amd64.tar.gz | tar xz
./drape upload tests results.xml --org my-org --wait
when: always
Buildkite¶
# .buildkite/pipeline.yml
steps:
- label: "Run tests"
command: |
pytest --junitxml=results.xml
curl -sL https://github.com/drape-io/drape-cli/releases/latest/download/drape_linux_amd64.tar.gz | tar xz
./drape upload tests results.xml --org my-org --wait
Jenkins¶
// Jenkinsfile
pipeline {
agent any
environment {
DRAPE_API_KEY = credentials('drape-api-key')
}
stages {
stage('Test') {
steps {
sh 'pytest --junitxml=results.xml'
}
post {
always {
sh '''
curl -sL https://github.com/drape-io/drape-cli/releases/latest/download/drape_linux_amd64.tar.gz | tar xz
./drape upload tests results.xml --org my-org --wait
'''
}
}
}
}
}
General Pattern¶
For any CI provider:
- Set
DRAPE_API_KEYas a secret/environment variable - Install the CLI (curl + tar, or use the Docker image)
- Run
drape upload tests <file>after your test step
See CI Auto-Detection for the full list of detected environment variables per provider.