|
38 | 38 | )
|
39 | 39 | from tasks.libs.common.gomodules import get_default_modules
|
40 | 40 | from tasks.libs.common.user_interactions import yes_no_question
|
| 41 | +from tasks.libs.common.utils import set_gitconfig_in_ci |
41 | 42 | from tasks.libs.common.worktree import agent_context
|
42 | 43 | from tasks.libs.pipeline.notifications import (
|
43 | 44 | DEFAULT_JIRA_PROJECT,
|
@@ -253,6 +254,7 @@ def tag_modules(
|
253 | 254 |
|
254 | 255 | if push:
|
255 | 256 | tags_list = ' '.join(tags)
|
| 257 | + set_gitconfig_in_ci(ctx) |
256 | 258 | ctx.run(f"git push origin {tags_list}{force_option}")
|
257 | 259 | print(f"Pushed tag {tags_list}")
|
258 | 260 | print(f"Created module tags for version {agent_version}")
|
@@ -288,6 +290,7 @@ def tag_version(
|
288 | 290 |
|
289 | 291 | if push:
|
290 | 292 | tags_list = ' '.join(tags)
|
| 293 | + set_gitconfig_in_ci(ctx) |
291 | 294 | ctx.run(f"git push origin {tags_list}{force_option}")
|
292 | 295 | print(f"Pushed tag {tags_list}")
|
293 | 296 | print(f"Created tags for version {agent_version}")
|
@@ -348,6 +351,7 @@ def finish(ctx, release_branch, upstream="origin"):
|
348 | 351 |
|
349 | 352 | commit_message = f"'Final updates for release.json and Go modules for {new_version} release'"
|
350 | 353 |
|
| 354 | + set_gitconfig_in_ci(ctx) |
351 | 355 | ok = try_git_command(ctx, f"git commit -m {commit_message}")
|
352 | 356 | if not ok:
|
353 | 357 | raise Exit(
|
@@ -490,6 +494,7 @@ def create_rc(ctx, release_branch, patch_version=False, upstream="origin", slack
|
490 | 494 | ctx.run("git add release.json")
|
491 | 495 | ctx.run("git ls-files . | grep 'go.mod$' | xargs git add")
|
492 | 496 |
|
| 497 | + set_gitconfig_in_ci(ctx) |
493 | 498 | ok = try_git_command(
|
494 | 499 | ctx, f"git commit --no-verify -m 'Update release.json and Go modules for {new_highest_version}'"
|
495 | 500 | )
|
@@ -672,6 +677,7 @@ def _main():
|
672 | 677 | # Step 2 - Push newly created release branch to the remote repository
|
673 | 678 |
|
674 | 679 | print(color_message("Pushing new branch to the upstream repository", "bold"))
|
| 680 | + set_gitconfig_in_ci(ctx) |
675 | 681 | res = ctx.run(f"git push --set-upstream {upstream} {release_branch}", warn=True)
|
676 | 682 | if res.exited is None or res.exited > 0:
|
677 | 683 | raise Exit(
|
@@ -772,6 +778,7 @@ def create_release_branches(ctx, base_directory="~/dd", major_version: int = 7,
|
772 | 778 | _save_release_json(rj)
|
773 | 779 | # Commit release.json
|
774 | 780 | ctx.run("git add release.json")
|
| 781 | + set_gitconfig_in_ci(ctx) |
775 | 782 | ok = try_git_command(ctx, f"git commit -m 'Update release.json with current milestone to {next}'")
|
776 | 783 |
|
777 | 784 | if not ok:
|
@@ -901,6 +908,7 @@ def cleanup(ctx, release_branch):
|
901 | 908 | ctx.run("git add release.json")
|
902 | 909 |
|
903 | 910 | commit_message = f"Update last_stable to {version}"
|
| 911 | + set_gitconfig_in_ci(ctx) |
904 | 912 | ok = try_git_command(ctx, f"git commit -m '{commit_message}'")
|
905 | 913 | if not ok:
|
906 | 914 | raise Exit(
|
@@ -1214,6 +1222,7 @@ def check_for_changes(ctx, release_branch, warning_mode=False):
|
1214 | 1222 | with clone(ctx, repo_name, repo['branch'], options="--filter=blob:none --no-checkout"):
|
1215 | 1223 | # We can add the new commit now to be used by release candidate creation
|
1216 | 1224 | print(f"Creating new tag {next_version} on {repo_name}", file=sys.stderr)
|
| 1225 | + set_gitconfig_in_ci(ctx) |
1217 | 1226 | ctx.run(f"git tag {next_version}")
|
1218 | 1227 | ctx.run(f"git push origin tag {next_version}")
|
1219 | 1228 | # This repo has changes, the next check is not needed
|
|
0 commit comments