Skip to content
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
8 changes: 4 additions & 4 deletions bin/mas-devops-notify-slack
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def notifyProvisionFyre(channel: str, rc: int) -> bool:
message = [
SlackUtil.buildHeader(f":glyph-ok: Your IBM DevIT Fyre OCP cluster ({name}) is ready"),
SlackUtil.buildSection(f"{url}"),
SlackUtil.buildSection(f"- Username: `{username}`\n - Password: `{password}`"),
SlackUtil.buildSection(f"- Username: `{username}`\n- Password: `{password}`"),
SlackUtil.buildSection(f"<https://beta.fyre.ibm.com/development/vms|Fyre Dashboard>{toolchainLink}")
]
else:
Expand All @@ -56,9 +56,9 @@ def notifyProvisionFyre(channel: str, rc: int) -> bool:

if __name__ == "__main__":
# If SLACK_TOKEN or SLACK_CHANNEL env vars are not set then silently exit taking no action
SLACK_TOKEN = os.getenv("SLACK_TOKEN", None)
SLACK_CHANNEL = os.getenv("SLACK_CHANNEL", None)
if SLACK_TOKEN is None or SLACK_CHANNEL is None:
SLACK_TOKEN = os.getenv("SLACK_TOKEN", "")
SLACK_CHANNEL = os.getenv("SLACK_CHANNEL", "")
if SLACK_TOKEN == "" or SLACK_CHANNEL == "":
sys.exit(0)

# Initialize the properties we need
Expand Down