Before you start
- Use a test pipeline and a final job that writes a harmless message or test artifact. Leave production credentials and destinations out of the pipeline.
- Arrange for an allowed approver and a regular account outside the approver group. Ask a pipeline or project administrator to verify the settings.
Data and access
Who does what
Compare approval rules
CircleCI
For a GitHub-type organization with security groups, add an approval job and make the test job depend on it. Attach the group-restricted context to the test job. A project member outside the group can click Approve, but the downstream job should show Unauthorized. Use a separate run to check an allowed approver.
Check. The downstream job reports Unauthorized after the out-of-group approval. In the separate allowed run, it reaches the test output.
Buildkite
Add a block step with allowed_teams for the approver when using team permissions. If the test job declares depends_on, include the block step explicitly. Check that someone outside the listed teams cannot unblock it and that the test job runs when the intended team member does.
Check. The block remains in place for the out-of-team account. The intended team member unblocks it and the dependent job starts.
Jenkins
Add a Pipeline input before the test action and set submitter to the intended user or group. Jenkins administrators can respond regardless of this setting, so test with an account that has no administrator access. Users with Job/Cancel can abort the input.
Check. The test log stops at the input for the out-of-scope user and reaches the next stage when an allowed submitter responds.
GitLab CI/CD
On Premium or Ultimate, set approval rules on a protected test environment and point the deployment job at it. Check Allowed to deploy separately from the approvers. Once the required approvals are in, an eligible user must still start the deployment job.
Check. The deployment waits for the required approvals. Record the separate start by a user who is allowed to deploy.
Compare the two runs
Record the pipeline run, revision, approving account, gate result and downstream job result. Check that the test artifact or message appears only on the run that passed the intended controls.
Check. Only the allowed run produces the test output. Tie each outcome to the same test action and its exact revision.
Check your result
Find one run that stopped at the gate or downstream permission check, and one that reached the test output. Keep the provider's status for both runs.
If you get stuck
The gate was approved but the next job did not run
Read the downstream job status and dependencies. Check the context membership in CircleCI, the block dependency in Buildkite, the allowed submitter in Jenkins or who can start the approved deployment in GitLab.