[P16] Sync rotated credentials to Woodpecker secrets #112
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Provision rotates credentials in
.envand PostgreSQL/Gitea backends, but Woodpecker secrets (registry_user,registry_pass,gitea_token,s3_access_key,s3_secret_key) are NOT updated. The next pipeline run uses stale secrets.Currently these secrets are manually configured in the Woodpecker UI and never rotated.
Fix
After rotating credentials, call the Woodpecker API to update repo secrets:
Woodpecker API:
PATCH /api/repos/{repo_id}/secrets/{name}with{"value": "..."}Secrets to sync
gitea_tokenGITEA_TOKEN(rotated by provision_gitea)registry_passGITEA_ADMIN_PASSWORD(rotated by derive_all)s3_access_keyRUSTFS_ACCESS_KEY(rotated by derive_all)s3_secret_keyRUSTFS_SECRET_KEY(rotated by derive_all)Acceptance criteria
provision_woodpecker()function updates all 4 secrets via API