integrations: Add screenshot configs for deployment integrations.

that do not have fixtures.
This commit is contained in:
Niloth P
2025-07-30 12:33:38 +05:30
committed by Tim Abbott
parent 7f2161bffa
commit 24eab61ab0
2 changed files with 22 additions and 0 deletions

View File

@@ -65,11 +65,14 @@ CATEGORIES: dict[str, StrPromise] = {
# WEBHOOK_INTEGRATIONS and NO_SCREENSHOT_CONFIG, but defined explicitly to
# avoid circular dependency
FIXTURELESS_INTEGRATIONS_WITH_SCREENSHOTS: list[str] = [
"capistrano",
"codebase",
"github-actions",
"jenkins",
"mercurial",
"openshift",
"perforce",
"puppet",
"svn",
]
FIXTURELESS_SCREENSHOT_CONTENT: dict[str, list[fixtureless_integrations.ScreenshotContent]] = {

View File

@@ -19,7 +19,9 @@ BO_GIT_NAME = "bo-williams"
# Example project content
PROJECT_NAME = "Example Project"
PROJECT_PATH_PERFORCE = "//depot/zerver/example-project/*"
PROJECT_STAGE = "production"
VERSION_NUMBER = "v9.2.3"
REVISION_NUMBER = THREE_DIGIT_NUMBER
# Example branch content
@@ -38,6 +40,8 @@ DEPLOYMENT_HASH = "e494a5be3393"
# Example datetime content
_DT = datetime(2025, 5, 30, 2, 0, 0, tzinfo=timezone.utc)
DATETIME_STAMP = _DT.strftime("%Y-%m-%d %H:%M:%S")
DATETIME_GLOBAL = f"<time:{_DT.strftime('%Y-%m-%dT%H:%M:%S%z')}>"
DATE_ISO_8601 = _DT.strftime("%Y-%m-%d")
class ScreenshotContent(TypedDict):
@@ -45,6 +49,11 @@ class ScreenshotContent(TypedDict):
content: str
CAPISTRANO = ScreenshotContent(
topic=PROJECT_NAME,
content=f"The [deployment]() to **{PROJECT_STAGE}** (version {VERSION_NUMBER}) has been completed successfully! :rocket:",
)
CODEBASE = ScreenshotContent(
topic=f"Push to {BRANCH_GIT} on {PROJECT_NAME}",
content=f"""{BO_NAME} pushed 2 commit(s) to `{BRANCH_GIT}` in project {PROJECT_NAME}:
@@ -73,6 +82,11 @@ MERCURIAL = ScreenshotContent(
""",
)
OPENSHIFT = ScreenshotContent(
topic=PROJECT_NAME,
content=f"""Deployment [{REVISION_NUMBER}]() triggered by a push to **{BRANCH_GIT}** by commit [{COMMIT_HASH_A[:7]}]() at {DATETIME_STAMP} has **failed**.""",
)
PERFORCE = ScreenshotContent(
topic=PROJECT_PATH_PERFORCE,
content=f"""
@@ -84,6 +98,11 @@ PERFORCE = ScreenshotContent(
""",
)
PUPPET = ScreenshotContent(
topic="Reports",
content=f"""Puppet production run for web-server-01 completed at {DATETIME_GLOBAL}. [GitHub Gist]() | [Report URL]()""",
)
SVN = ScreenshotContent(
topic=PROJECT_NAME,
content=f"""**{BO_GIT_NAME}** committed revision r{REVISION_NUMBER} to `{BRANCH_SVN}`.