feat: ci build secrets - #3142
Conversation
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
There was a problem hiding this comment.
🟡 Changes recommended
There are confirmed React state/override-handling bugs in the newly added build-secrets/SSH wiring that can lead to lost validation state or showing the wrong config when override is disabled.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds support for configuring Docker BuildKit build secrets and SSH keys in CI build configuration flows (global CI config, pipeline override, and pipeline form validation), using an enterprise-provided BuildSecrets component when available.
Changes:
- Extends CI pipeline form error state to include
secretsErrorandsshError, and blocks saving when invalid. - Introduces
secrets/sshconfig wiring in CI config forms and advanced options, including persistence indockerBuildConfig. - Adds new override keys (
secrets,ssh) to the docker config override update flow.
File summaries
| File | Description |
|---|---|
| src/components/workflowEditor/types.ts | Adds secretsError / sshError fields to pipeline form error type. |
| src/components/CIPipelineN/CIPipeline.tsx | Includes secrets/SSH validity in build-stage validation and save gating. |
| src/components/CIPipelineN/AdvancedConfigOptions.tsx | Wires BuildSecrets (enterprise import), persists secrets/SSH into overrides, and surfaces validation errors. |
| src/components/ciPipeline/types.ts | Adds override keys for secrets and ssh. |
| src/components/ciConfig/types.tsx | Extends CI config prop types to include secrets/SSH state + error setters. |
| src/components/ciConfig/CIDockerFileConfig.tsx | Plumbs secrets/SSH props down into CIAdvancedConfig. |
| src/components/ciConfig/CIConfigForm.tsx | Adds secrets/SSH state, validation gating, and persistence into saved dockerBuildConfig. |
| src/components/ciConfig/CIAdvancedConfig.tsx | Renders BuildSecrets in advanced options for non-buildpack CI config. |
Review details
Suppressed comments (1)
src/components/CIPipelineN/AdvancedConfigOptions.tsx:225
- setFormDataErrorObj uses a spread of the stale formDataErrorObj snapshot, which can overwrite other error flags when multiple fields update quickly. Prefer the functional updater form to ensure you merge with the latest state.
const handleSSHError = (hasError: boolean): void => {
setFormDataErrorObj({
...formDataErrorObj,
sshError: { isValid: !hasError, message: 'Invalid SSH keys' },
})
}
- Files reviewed: 8/8 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n |
|



Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Checklist: