Skip to content

feat: ci build secrets - #3142

Open
arunjaindev wants to merge 4 commits into
developfrom
feat/ci-build-secrets
Open

feat: ci build secrets#3142
arunjaindev wants to merge 4 commits into
developfrom
feat/ci-build-secrets

Conversation

@arunjaindev

Copy link
Copy Markdown
Contributor

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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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

  • Test A
  • Test B

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 secretsError and sshError, and blocks saving when invalid.
  • Introduces secrets/ssh config wiring in CI config forms and advanced options, including persistence in dockerBuildConfig.
  • 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.

Comment thread src/components/CIPipelineN/AdvancedConfigOptions.tsx Outdated
Comment thread src/components/CIPipelineN/AdvancedConfigOptions.tsx
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

Some linked issues are invalid. Please update the issue links:\nIssue # in is not found or invalid (HTTP }404).\n

@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR:Issue-verification-failed PR:Issue-verification-failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants