Skip to content
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

feat: Add runbook hint to merge_approved_prs.py #13

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions tubular/scripts/merge_approved_prs.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#! /usr/bin/env python3

"""
Command-line script to trigger a jenkins job
Script to merge private patches into a temporary commit for deployment.

This is intended to be used with edx/edx-platform-private according to
2U's private patch process:
https://2u-internal.atlassian.net/wiki/spaces/ENG/pages/19466701/LMS+Studio+Security+Fix+Process
"""
from datetime import datetime
import logging
Expand Down Expand Up @@ -145,7 +149,14 @@ def octomerge(
for pr in approved_prs
)
))
local_repo.octopus_merge(target_branch, [pr.head.sha for pr in approved_prs])
try:
local_repo.octopus_merge(target_branch, [pr.head.sha for pr in approved_prs])
except BaseException as e:
logging.error(
"Merging of private PRs failed; see this runbook for hints: "
"https://2u-internal.atlassian.net/wiki/spaces/ENG/pages/19466701/LMS+Studio+Security+Fix+Process#Deployments-are-failing-in-the-build_edxapp_amis%2Fprerelease_materials_job-step-in-GoCD"
)
raise e
else:
logging.info("No PRs to merge")

Expand Down
Loading