mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
integrations: Add screenshot configs for deployment integrations.
that do not have fixtures.
This commit is contained in:
@@ -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]] = {
|
||||
|
@@ -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}`.
|
||||
|
Reference in New Issue
Block a user