A task that names a resource is given access to it before its script starts, as the task’s bot. Naming a resource grants nothing: the bot’s policies must allow it. When they don’t, the task fails before its script starts, and its log names the missing permission.
Each of secrets, buckets and clusters needs bot on the task.
Secrets
tasks:
test:
image: hub/library/golang:1.25
bot: ci-tester
secrets:
DATABASE_URL: staging-db#url
API_TOKEN: partner-token
run: go test -tags=integration ./...secrets maps an environment variable to a secret in the connection’s project, by name
or ID: name for a secret with one value, name#field for one field. The value is read as the bot
when the task starts and is masked as *** in the task’s log.
A secret’s value isn’t part of the task’s key: rotating it reruns nothing.
The registry
A task with a bot has Docker’s login for the project’s registry host ($EZGH_REGISTRY) set up,
as the bot (DOCKER_CONFIG). Pushing needs the bot to be allowed to push.
Buckets
tasks:
publish:
image: hub/amazon/aws-cli:2
bot: site-publisher
buckets: [site-assets]
inputs: ["public/**"]
run: aws s3 sync public "s3://site-assets/"buckets lists Object Storage buckets by name. The task gets
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_ENDPOINT_URL, AWS_REGION and
AWS_DEFAULT_REGION for an access key owned by the bot. The key expires by itself shortly after the
task’s timeout.
Clusters
tasks:
rollout:
image: hub/bitnami/kubectl:1.33
bot: prod-deployer
clusters: [production]
cache: false
inputs: []
run: kubectl rollout status deployment/app --timeout=5mclusters lists Kubernetes clusters by name. The task gets KUBECONFIG with one
context for each, signed in as the bot.
The bot needs an access entry on the cluster, as any bot or user does: see kubectl
access. A task that names clusters must also write cache, true
or false.