Skip to content

Commit

Permalink
release: configure ssh key before using git
Browse files Browse the repository at this point in the history
In #65555 we added check to make sure we don't try to push the same tag
twice. The `git ls-remote` command, which uses `ssh://` was missing a
step that configures the SSH key.

This patch configures SSH earlier in the process.

Release note: None
  • Loading branch information
rail committed Jun 1, 2021
1 parent 82a4d1d commit 75ba2d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/release/teamcity-publish-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ tc_end_block "Variable Setup"


tc_start_block "Check remote tag"
github_ssh_key="${GITHUB_COCKROACH_TEAMCITY_PRIVATE_SSH_KEY}"
configure_git_ssh_key
if git_wrapped ls-remote --exit-code --tags "ssh://[email protected]/${git_repo_for_tag}.git" "${build_name}"; then
echo "Tag ${build_name} already exists"
exit 1
Expand Down Expand Up @@ -110,8 +112,6 @@ tc_end_block "Make and push docker images"


tc_start_block "Push release tag to GitHub"
github_ssh_key="${GITHUB_COCKROACH_TEAMCITY_PRIVATE_SSH_KEY}"
configure_git_ssh_key
git_wrapped push "ssh://[email protected]/${git_repo_for_tag}.git" "$build_name"
tc_end_block "Push release tag to GitHub"

Expand Down

0 comments on commit 75ba2d7

Please sign in to comment.