-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetching SSH creds for git extemely unreliable in a seemingly random way #221
Comments
Hi @c2h5oh thanks for the detailed bug report. I'm in the middle of overhauling how this works. I will try to make sure the new system works with the pipeline YAML you've provided. It would help immensely if you also send a link to the jobs to support@buildkite.com. |
@triarius done |
Apologies for the delay @c2h5oh. I've had a look, and it seems what writes the git credentials to the So if you want to run a bash command with the ssh credentials written to a file, you can do something like: steps:
- label: ':pipeline: Pipeline Setup'
agents:
queue: my-ci
plugins:
- kubernetes:
gitEnvFrom:
- secretRef:
name: buildkite-agent-ssh
podSpec:
containers:
- image: 'buildkite/agent:latest'
command:
- buildkite-agent
args:
- pipeline upload
- image: 'buildkite/agent:latest'
command:
- ssh-env-config.sh
args:
- bash
- -c
- "'echo $${BUILDKITE_BRANCH}'" Note that there are a few subtleties when writing bash commands as Kubernetes container
Note: |
Changes to podSpec result in unpredictable checkout failures, example:
Works perfectly - 100% success rate
Adding an extra container results in 100% failure rate on checkout stage - missing creds - before any of the containers in spec are started. I have managed to trigger this by modifications as small as an additional space between args
Adding
yields
for the first example
for the second one
With
second example reports that
/workspace/.ssh
doesn't existWith
That flag is passed to git command in first example, but not in the second.
The text was updated successfully, but these errors were encountered: