Designing Self-Serve Deploys for Dev and Separate Approval for Production

A single "can deploy" checkbox cannot give you both fast dev deploys and independent production approval. A design that evaluates view, request, execute, and approve separately the moment an environment is chosen, and how to stop requesters from approving their own production deploys.

John Baek
John Baek
Founder, CollabOps
2 min read

A developer has fixed a bug on the booking screen. They want to push it to the dev environment right away and check it. When it goes to production, someone else needs to review the change and the test results. Cram both needs into one "can deploy" checkbox and you are stuck choosing: make dev deploys wait for sign-off too, or open production with the same permission.

Deploy permission is not a single switch. Only by deciding view, request, execute, and approve separately for each environment can you keep both development speed and independent production review.

Same developer, same build, different environment: what changes?

Evaluate view, deploy request, actual execution, and approval separately at the moment an environment is selected. When the same developer picks build 218 of the same booking service, a policy like this can apply. (The build number and policy are illustrative.)

Selected environmentWhat the developer can seeWhat the developer can doWhen approval is needed
Dev devCurrent version and their own run logsStart a deploy to devNo extra approval
Staging stageTest results and candidate buildsStart a deploy of a build that passed required testsIn this example, runs once tests pass
Production prodProduction rollout status and the change summary they are allowed to seeRequest a production deploy of build 218A designated executor rolls it out after an independent approver reviews it

When the user selects production, the button is more accurate as Request production deploy. Right after the click, the status is Awaiting approval. The approver checks which build of which service goes to which production target, and the executor uses the exact artifact the approval is attached to. Even if the build's display name is unchanged, if the file contents changed, the existing approval cannot carry over to the new file.

What if an approver requests their own deploy?

Apply an independent-approval policy to deploys a person requested themselves: their own screen shows only progress, and the approve button goes to another designated approver. Someone who is normally a production approver is just the requester on their own request. GitHub's environment protection rules also offer an option that prevents whoever triggered a deployment from approving it. In CollabOps, per-environment deploy steps, production approval stages, and run history are part of the publicly documented feature set.

What happens when an approver's eligibility changes after they have already approved is covered in if an approver loses their role right before the deploy.

How do you check environment-specific permissions?

Environment-specific permissions are easiest to check by keeping the developer account fixed and switching the environment three times. In dev it runs immediately. In staging you can see which checks remain. In production a request is created and then waits for a human decision. One screen shows both what developers can handle themselves and the moment the operations team takes responsibility.

  • #deployment
  • #permissions
  • #change-management
  • #cicd
  • #devops