Skip to content

Add ssh-key add to cni-plugin push-images pipeline [master]#11952

Merged
danudey merged 1 commit into
projectcalico:masterfrom
danudey:cni-plugin-add-ssh-key-to-agent-master
Feb 27, 2026
Merged

Add ssh-key add to cni-plugin push-images pipeline [master]#11952
danudey merged 1 commit into
projectcalico:masterfrom
danudey:cni-plugin-add-ssh-key-to-agent-master

Conversation

@danudey
Copy link
Copy Markdown
Contributor

@danudey danudey commented Feb 27, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 27, 2026 23:23
@danudey danudey requested a review from a team as a code owner February 27, 2026 23:23
@danudey danudey added docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact labels Feb 27, 2026
@marvin-tigera marvin-tigera added this to the Calico v3.32.0 milestone Feb 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the SemaphoreCI “push-images” pipeline for the cni-plugin component by adding an ssh-add step to the global prologue, presumably to ensure SSH credentials are available during image publishing.

Changes:

  • Add ssh-add ~/.ssh/id_rsa to the .semaphore/push-images/cni-plugin.yml global job prologue.

- echo $DOCKER_TOKEN | docker login --username "$DOCKER_USER" --password-stdin
- echo $QUAY_TOKEN | docker login --username "$QUAY_USER" --password-stdin quay.io
- export BRANCH_NAME=$SEMAPHORE_GIT_BRANCH
- ssh-add ~/.ssh/id_rsa
Copy link

Copilot AI Feb 27, 2026

Choose a reason for hiding this comment

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

ssh-add ~/.ssh/id_rsa is likely to fail in Semaphore because this pipeline does not load an SSH key secret (most other pipelines add keys from ~/.keys/* after chmod 0600, e.g. .semaphore/release/cut-branch.yml), and ~/.ssh/id_rsa may not exist or may be passphrase-protected. Since the global prologue runs even for PR builds (where the jobs are no-ops), a failing ssh-add would break the workflow unnecessarily. Please either (a) add the appropriate SSH-key secret and use the established ~/.keys/* + chmod 0600 pattern, or (b) gate ssh-add behind a key-exists/branch-only check if it’s only needed for non-PR publishing runs.

Suggested change
- ssh-add ~/.ssh/id_rsa
- if [ -z "${SEMAPHORE_GIT_PR_NUMBER}" ] && [ -f "${HOME}/.ssh/id_rsa" ]; then ssh-add "${HOME}/.ssh/id_rsa" || true; fi

Copilot uses AI. Check for mistakes.
@danudey danudey merged commit 2931e54 into projectcalico:master Feb 27, 2026
8 checks passed
@danudey danudey deleted the cni-plugin-add-ssh-key-to-agent-master branch February 27, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs-not-required Docs not required for this change release-note-not-required Change has no user-facing impact skip-bot-cherry-pick

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants