Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
3840f99
[minor] Support January Catalog Update
prveenkumr Jan 5, 2026
c58dea4
Merge branch 'master' into update-260129
prveenkumr Jan 6, 2026
6960158
Merge branch 'master' into update-260129
prveenkumr Jan 9, 2026
5d9be1c
Merge branch 'master' into update-260129
prveenkumr Jan 12, 2026
635017d
Merge branch 'master' into update-260129
prveenkumr Jan 12, 2026
a622acf
Merge branch 'master' into update-260129
prveenkumr Jan 12, 2026
bca218b
Merge branch 'master' into update-260129
prveenkumr Jan 13, 2026
3dee09b
Merge branch 'master' into update-260129
prveenkumr Jan 15, 2026
d7bc228
Merge branch 'master' into update-260129
prveenkumr Jan 15, 2026
fa689cb
Merge branch 'master' into update-260129
prveenkumr Jan 16, 2026
b20eb47
[patch] jan release prep
prveenkumr Jan 19, 2026
5aeb7c8
Merge branch 'master' into update-260129
prveenkumr Jan 19, 2026
a3eea49
[patch] re-build
anilprajapatiibm Jan 20, 2026
712266e
[patch] re-build
anilprajapatiibm Jan 21, 2026
989aff5
Merge branch 'master' into update-260129
prveenkumr Jan 21, 2026
b4372ed
[patch] update latest catalog digest
prveenkumr Jan 21, 2026
e3cc09c
[patch] update v9-260129-amd64
prveenkumr Jan 21, 2026
dd2c21f
Merge branch 'master' into update-260129
prveenkumr Jan 22, 2026
8d11fba
[patch] update latest catalog digest
prveenkumr Jan 22, 2026
dfed83c
[patch] Included a mapping for version 5.2.0
prveenkumr Jan 22, 2026
c86982d
cli rebuild
prveenkumr Jan 22, 2026
ce09ad3
[patch] cli rebuild
prveenkumr Jan 22, 2026
8111911
[patch] fix syntax error
prveenkumr Jan 22, 2026
fcf860b
[patch] Introduces a check to determine if the current CP4D
prveenkumr Jan 22, 2026
893f600
[patch] fix cpd upgrade path issue
prveenkumr Jan 22, 2026
4ac6d77
[patch] cpd upgrade path
prveenkumr Jan 22, 2026
5d76da4
[patch] fix cpd upgrade path
prveenkumr Jan 22, 2026
17b652c
Merge branch 'master' into update-260129
prveenkumr Jan 22, 2026
0dbf89c
[patch] empty commit
prveenkumr Jan 22, 2026
f78d2dd
[patch] rebuild cli
prveenkumr Jan 22, 2026
f6531a4
Merge branch 'master' into update-260129
prveenkumr Jan 23, 2026
0c02c2a
[patch] cli rebuild
prveenkumr Jan 23, 2026
677fd68
Merge branch 'master' into update-260129
prveenkumr Jan 23, 2026
891e96b
Merge branch 'master' into update-260129
prveenkumr Jan 23, 2026
9bb1fb1
Merge branch 'master' into update-260129
prveenkumr Jan 23, 2026
567d28b
[patch] rebuild cli
prveenkumr Jan 23, 2026
1ec151b
[patch] rebuild cli
prveenkumr Jan 26, 2026
b853a6f
[patch] re-build
anilprajapatiibm Jan 27, 2026
930ef6e
Merge branch 'master' into update-260129
prveenkumr Jan 27, 2026
0383f7f
[patch] update latest catalog digest
prveenkumr Jan 27, 2026
cd02427
[patch] add local tar
anilprajapatiibm Jan 27, 2026
be68a49
[patch] update latest catalog digest
prveenkumr Jan 27, 2026
1c30d8f
[patch] remove local tar file
prveenkumr Jan 27, 2026
50cb6e4
[patch] cli rebuild
prveenkumr Jan 27, 2026
2f7ea51
[patch] add cli notification
anilprajapatiibm Jan 29, 2026
829490c
Merge branch 'master' into notification-ap
anilprajapatiibm Jan 29, 2026
9a5c2af
[patch] fix lint error
anilprajapatiibm Jan 29, 2026
715e53e
[patch] fix lint error
anilprajapatiibm Jan 29, 2026
25f0970
[patch] remove false positive channel number
anilprajapatiibm Jan 29, 2026
f4e0413
[minor] Support February Catalog Update
prveenkumr Feb 9, 2026
991f927
Merge branch 'master' into update-260226
prveenkumr Feb 10, 2026
3814b83
[patch] added catalog files
prveenkumr Feb 10, 2026
38f6a3e
[patch] add start and stop notification
anilprajapatiibm Feb 10, 2026
3ed2756
[patch] update latest catalog digest
prveenkumr Feb 12, 2026
26a3230
[patch] ocp420 addition (#2056)
shimto-jacob-siby Feb 12, 2026
f376629
Merge branch 'master' into update-260226
prveenkumr Feb 12, 2026
e09ff76
Merge branch 'master' into notification-ap
anilprajapatiibm Feb 13, 2026
8e1d018
[patch] handle slack_token and slack_channel
anilprajapatiibm Feb 13, 2026
c31179a
[patch] add cat ${GITHUB_WORKSPACE}/python/src/mas/cli/cli.py
anilprajapatiibm Feb 13, 2026
14cad8f
Revert "[patch] add cat ${GITHUB_WORKSPACE}/python/src/mas/cli/cli.py"
anilprajapatiibm Feb 13, 2026
0af758f
Merge branch 'master' into notification-ap
anilprajapatiibm Feb 13, 2026
0d5e8d3
[patch] add slack_token and slack_channel into optional field
anilprajapatiibm Feb 13, 2026
c7c4801
[patch] rebuild
anilprajapatiibm Feb 13, 2026
feea008
[patch] add slack vars in optional args
anilprajapatiibm Feb 13, 2026
e101a50
[patch] remove extra line
anilprajapatiibm Feb 13, 2026
c93c19a
[patch] use slack secrets from mas-devops-slack
anilprajapatiibm Feb 13, 2026
9c30a32
[patch] rebuild
anilprajapatiibm Feb 13, 2026
dc0db1d
[patch] add slack channel names into summary
anilprajapatiibm Feb 13, 2026
8d141a6
[patch] add slack vars into create secret func
anilprajapatiibm Feb 13, 2026
2e1fd37
[patch] add pipeline name into slack notification
anilprajapatiibm Feb 13, 2026
082a103
Merge branch 'master' into update-260226
prveenkumr Feb 17, 2026
e908571
[patch] update latest catalog digest
prveenkumr Feb 17, 2026
e2bf410
[patch] rebuild cli
prveenkumr Feb 17, 2026
356d5dc
[patch] Disable path-based routing configuration
prveenkumr Feb 17, 2026
2433375
Revert "[patch] Disable path-based routing configuration"
prveenkumr Feb 17, 2026
33805a6
[patch] Update v9-260226 catalog image digests
prveenkumr Feb 19, 2026
931f135
[patch] rebuild cli
prveenkumr Feb 19, 2026
3fe3bbf
[patch] Make ingress configuration optional
prveenkumr Feb 19, 2026
650af50
Revert "[patch] Make ingress configuration optional"
prveenkumr Feb 19, 2026
e75a465
[patch] rebuild cli
prveenkumr Feb 19, 2026
9962a29
[patch] add local tar file
prveenkumr Feb 19, 2026
90cf33c
Merge branch 'master' into update-260226
prveenkumr Feb 21, 2026
20343a8
[patch] Update Maximo operator catalog image SHAs
prveenkumr Feb 21, 2026
871d4a9
[patch] Update MAS DevOps installer archives
prveenkumr Feb 21, 2026
f2c0e10
[patch] update latest catalog digest
prveenkumr Feb 22, 2026
42c70cc
Merge branch 'master' into update-260226
prveenkumr Feb 23, 2026
b1b02a2
[patch] update local tar file
prveenkumr Feb 23, 2026
d938dc3
Merge branch 'master' into notification-ap
anilprajapatiibm Feb 24, 2026
5cdbc38
Merge branch 'update-260226' into notification-ap
anilprajapatiibm Feb 24, 2026
eb6d127
[patch] remove local tar
anilprajapatiibm Feb 24, 2026
38a7504
[patch] fetch the DEVOPS_ENVIRONMENT from mas-devops-slack
anilprajapatiibm Feb 24, 2026
4140f54
patch] fetch the DEVOPS_ENVIRONMENT from mas-devops-slack
anilprajapatiibm Feb 24, 2026
6646329
[patch] send only completion notification
anilprajapatiibm Feb 24, 2026
0628faf
[patch] rebuild
anilprajapatiibm Feb 24, 2026
baced1b
Revert "[patch] send only completion notification"
anilprajapatiibm Feb 24, 2026
f523ab6
[patch] add task name as DEVOPS_SUITE_NAME to get what we are running…
anilprajapatiibm Feb 24, 2026
a2a7b1a
[patch] add role name and playbook name back
anilprajapatiibm Feb 24, 2026
f7074fc
[patch] rebuild
anilprajapatiibm Feb 25, 2026
a752f4b
[patch] print slack args
anilprajapatiibm Mar 3, 2026
bf0c8cf
[patch] add pipeline start and pipeline finish function in update pip…
anilprajapatiibm Mar 6, 2026
232cb76
Merge branch 'master' into notification-ap
anilprajapatiibm Mar 6, 2026
2c9f3d9
[patch] fix syntax error
anilprajapatiibm Mar 6, 2026
0a6be01
[patch] add slack tests
anilprajapatiibm Mar 6, 2026
bb311ea
[patch] remove extra new lines
anilprajapatiibm Mar 6, 2026
c902067
[patch] fix syntax error
anilprajapatiibm Mar 6, 2026
876e7f8
[patch] add new line to fix lint error
anilprajapatiibm Mar 6, 2026
e9d3164
[patch] add slack agrs into the update and upgrade
anilprajapatiibm Mar 6, 2026
43f1527
[patch] use python file to send pipeline slack
anilprajapatiibm Mar 6, 2026
f4b35c1
[patch] fix syntax
anilprajapatiibm Mar 9, 2026
78d3f29
Merge branch 'master' into notification-ap
anilprajapatiibm Apr 8, 2026
96f5104
[patch] re-build
anilprajapatiibm Apr 8, 2026
9ababf7
[patch] re-build
anilprajapatiibm Apr 8, 2026
3c77fad
[patch] use pipeline run name in message
anilprajapatiibm Apr 10, 2026
b445f04
[patch] add no notifications other then "mas-install", "mas-update", …
anilprajapatiibm Apr 10, 2026
db1a114
[patch] fix lint
anilprajapatiibm Apr 10, 2026
f315201
[patch] remove debug echo
anilprajapatiibm Apr 10, 2026
88dfd75
Merge branch 'master' into notification-ap
anilprajapatiibm Apr 13, 2026
33b86e1
[patch] add echo statements
anilprajapatiibm Apr 13, 2026
56e584e
[patch] add sending notification logs
anilprajapatiibm Apr 14, 2026
4063d61
[patch] add slack token and channel vars into cli-env nosuitename
anilprajapatiibm Apr 14, 2026
429c17a
[patch] use pipeline params
anilprajapatiibm Apr 14, 2026
9212195
[patch] add pipeline vars
anilprajapatiibm Apr 14, 2026
caf8d76
[patch] add pipeline vars into name: mas-devops-wait-for-configmap-v2…
anilprajapatiibm Apr 14, 2026
6314270
[patch] fix wrong env var places
anilprajapatiibm Apr 14, 2026
8af4899
[patch] remove duplicate entries
anilprajapatiibm Apr 14, 2026
8e4d9ca
[patch] fixing the pipelinerun_namespace env vars
anilprajapatiibm Apr 14, 2026
e898bd9
[patch] remove extra string type
anilprajapatiibm Apr 14, 2026
ae8dfbf
[patch] add pipeline vars into cli params taskdefs
anilprajapatiibm Apr 14, 2026
c066e3e
[patch] use pipeline run name in the playbook notification send
anilprajapatiibm Apr 14, 2026
b9e5e02
Merge branch 'master' into notification-ap
anilprajapatiibm Apr 15, 2026
b146847
[patch] rebuild
anilprajapatiibm Apr 15, 2026
8d2deb5
Merge branch 'master' into notification-ap
anilprajapatiibm Apr 15, 2026
a2cd5da
[patch] use DEVOPS_ENVIRONMENT from mas-devops-slack
anilprajapatiibm Apr 15, 2026
f91691c
[patch] add pipeline name vars
anilprajapatiibm Apr 16, 2026
f223bd0
[patch] add mas update prepareUpdateSlackSecrets
anilprajapatiibm Apr 16, 2026
fbb166a
[patch] Add mas update command
anilprajapatiibm Apr 16, 2026
3b01939
[patch] rebuild
anilprajapatiibm Apr 16, 2026
a1edea8
[patch] add image pull policy in update upgrade uninstall
anilprajapatiibm Apr 16, 2026
e0c0f9e
[patch] revert makefile changes
anilprajapatiibm Apr 16, 2026
05a924e
Merge branch 'master' into notification-ap
anilprajapatiibm Apr 16, 2026
3e9cfe0
[patch] remove debug message
anilprajapatiibm Apr 16, 2026
c3068b8
[patch] use common cli param file
anilprajapatiibm Apr 16, 2026
c5ae6ae
[patch] remove md files
anilprajapatiibm Apr 16, 2026
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Documentation
Want to contribute to MAS Command Line Interface?
-------------------------------------------------------------------------------
We welcome every Maximo Application Suite users, developers and enthusiasts to contribute to the MAS Command Line Interface while fixing code issues and implementing new automated functionalities.
You can contribute to this collection by raising [a new issue](https://github.com/ibm-mas/cli/issues) with suggestions on how to make our MAS automation engine even better, or if you want to become a new code contributor, please refer to the [Contributing Guidelines](CONTRIBUTING.md) and learn more about how to get started.
You can contribute to this collection by raising [a new issue](https://github.com/ibm-mas/cli/issues) with suggestions on how to make our MAS automation engine even better, or if you want to become a new code contributor, please refer to the [Contributing Guidelines](CONTRIBUTING.md) and learn more about how to get started.
25 changes: 25 additions & 0 deletions image/cli/app-root/src/run-playbook.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,32 @@ source /opt/app-root/src/env.sh

python3 /opt/app-root/src/register-start.py

# Capture the playbook name for notification
PLAYBOOK_NAME="$1"

# Send Slack start notification if configured
if [ -n "$SLACK_TOKEN" ] && [ -n "$SLACK_CHANNEL" ]; then
python3 /opt/app-root/bin/mas-devops-notify-slack \
--action ansible-start \
--task-name "$DEVOPS_SUITE_NAME" \
--pipeline-name "${PIPELINERUN_NAME:-unknown}" \
--instance-id "${DEVOPS_ENVIRONMENT:-}" || true
echo "# ----------------- Sending Start Notification Suite: $DEVOPS_SUITE_NAME | pipeline: $PIPELINE_NAME($PIPELINERUN_NAME) | Instance id: $DEVOPS_ENVIRONMENT -------------------- #"
fi

ansible-playbook ibm.mas_devops."$@"
rc=$?

# Send Slack completion notification if configured
if [ -n "$SLACK_TOKEN" ] && [ -n "$SLACK_CHANNEL" ]; then
python3 /opt/app-root/bin/mas-devops-notify-slack \
--action ansible-complete \
--rc $rc \
--task-name "$DEVOPS_SUITE_NAME" \
--pipeline-name "${PIPELINERUN_NAME:-unknown}" \
--instance-id "${DEVOPS_ENVIRONMENT:-}" || true
echo "# ----------------- Sending Start Notification Suite: $DEVOPS_SUITE_NAME | pipeline: $PIPELINE_NAME($PIPELINERUN_NAME) | Instance id: $DEVOPS_ENVIRONMENT -------------------- #"
fi

python3 /opt/app-root/src/save-junit-to-mongo.py
exit $rc
23 changes: 23 additions & 0 deletions image/cli/app-root/src/run-role.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,30 @@ python3 /opt/app-root/src/register-start.py

export ROLE_NAME=$1
shift

# Send Slack start notification if configured
if [ -n "$SLACK_TOKEN" ] && [ -n "$SLACK_CHANNEL" ]; then
python3 /opt/app-root/bin/mas-devops-notify-slack \
--action ansible-start \
--task-name "$DEVOPS_SUITE_NAME" \
--pipeline-name "${PIPELINERUN_NAME:-unknown}" \
--instance-id "${DEVOPS_ENVIRONMENT:-}" || true
echo "# ----------------- Sending Start Notification Suite: $DEVOPS_SUITE_NAME | pipeline: $PIPELINE_NAME($PIPELINERUN_NAME) | Instance id: $DEVOPS_ENVIRONMENT -------------------- #"
fi

ansible-playbook ibm.mas_devops.run_role $@
rc=$?

# Send Slack completion notification if configured
if [ -n "$SLACK_TOKEN" ] && [ -n "$SLACK_CHANNEL" ]; then
python3 /opt/app-root/bin/mas-devops-notify-slack \
--action ansible-complete \
--rc $rc \
--task-name "$DEVOPS_SUITE_NAME" \
--pipeline-name "${PIPELINERUN_NAME:-unknown}" \
--instance-id "${DEVOPS_ENVIRONMENT:-}" || true
echo "# ----------------- Sending Stop Notification Suite: $DEVOPS_SUITE_NAME | pipeline: $PIPELINE_NAME($PIPELINERUN_NAME) | Instance id: $DEVOPS_ENVIRONMENT -------------------- #"
fi

python3 /opt/app-root/src/save-junit-to-mongo.py
exit $rc
105 changes: 96 additions & 9 deletions image/cli/app-root/src/update-pipeline-status.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,62 @@

import os
import sys
import subprocess
from datetime import datetime, UTC
from pymongo import MongoClient

if __name__ == "__main__":
if "DEVOPS_MONGO_URI" not in os.environ or os.environ['DEVOPS_MONGO_URI'] == "":
sys.exit(0)

print("MongoDb integration enabled (v2 data model)")
def send_slack_notification(action, pipeline_name, instance_id, rc=0):
"""
Send Slack notification for pipeline start or completion using CLI command.

# Initialize the properties we need
Args:
action: Either 'pipeline-start' or 'pipeline-complete'
pipeline_name: Name of the pipeline
instance_id: MAS instance ID
rc: Return code (0 for success, non-zero for failure)
"""
slack_token = os.getenv("SLACK_TOKEN", "")
slack_channel = os.getenv("SLACK_CHANNEL", "")

if not slack_token or not slack_channel:
return

try:
print(f"Sending Slack notification: action={action}, pipeline={pipeline_name}, instance={instance_id}")

if action == "pipeline-start":
cmd = [
"python3", "/opt/app-root/bin/mas-devops-notify-slack",
"--action", "pipeline-start",
"--instance-id", instance_id,
"--pipeline-name", pipeline_name
]
elif action == "pipeline-complete":
cmd = [
"python3", "/opt/app-root/bin/mas-devops-notify-slack",
"--action", "pipeline-complete",
"--rc", str(rc),
"--instance-id", instance_id,
"--pipeline-name", pipeline_name
]
else:
print(f"Unknown action: {action}")
return

# Run the command, ignore errors (|| true equivalent)
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode == 0:
print("Slack notification sent successfully")
else:
print(f"Slack notification command failed (ignored): {result.stderr}")

except Exception as e:
print(f"Error sending Slack notification (ignored): {e}")


if __name__ == "__main__":
# Initialize the properties we need
# Note: We don't use MAS_INSTANCE_ID to remove the confusion between when a role actually
# needs MAS_INSTANCE_ID and when we are providing it just for the reporting framework
instanceId = os.getenv("DEVOPS_ENVIRONMENT", "")
Expand All @@ -28,11 +73,40 @@
pipelineRunName = os.getenv("PIPELINERUN_NAME", "")
pipelineRunNamespace = os.getenv("PIPELINERUN_NAMESPACE", "")

if "" in [instanceId, build, pipelineName, pipelineStatus, pipelineRunName, pipelineRunNamespace]:
print("Pipeline status not recorded because one or more required env vars are not set")
sys.exit(0)
# =========================================================================
# Slack Notification Logic (runs independently)
# =========================================================================
SLACK_TOKEN = os.getenv("SLACK_TOKEN", "")
SLACK_CHANNEL = os.getenv("SLACK_CHANNEL", "")

runId = f"{instanceId}:{build}"
if SLACK_TOKEN and SLACK_CHANNEL:
print("\nSlack integration enabled")

if "" in [instanceId, pipelineName, pipelineRunName, pipelineStatus]:
print("Slack notification skipped: one or more required env vars are not set")
elif pipelineName not in ["mas-install", "mas-update", "mas-upgrade", "mas-uninstall"]:
print(f"No slack notifications for pipeline: {pipelineName}")
else:
if pipelineStatus == "Started":
print("Sending pipeline start notification to Slack...")
send_slack_notification("pipeline-start", pipelineRunName, instanceId)

elif pipelineStatus in ["Completed", "Succeeded"]:
print("Sending pipeline completion (success) notification to Slack...")
send_slack_notification("pipeline-complete", pipelineRunName, instanceId, rc=0)

elif pipelineStatus == "Failed":
print("Sending pipeline completion (failure) notification to Slack...")
send_slack_notification("pipeline-complete", pipelineRunName, instanceId, rc=1)
else:
print("\nSlack integration disabled (SLACK_TOKEN or SLACK_CHANNEL not set)")

# =========================================================================
# MongoDB Integration Logic (runs independently)
# =========================================================================
if "DEVOPS_MONGO_URI" not in os.environ or os.environ['DEVOPS_MONGO_URI'] == "":
print("\nMongoDb integration disabled (DEVOPS_MONGO_URI not set)")
sys.exit(0)

print(f"Instance ID .............. {instanceId}")
print(f"Build .................... {build}")
Expand All @@ -41,6 +115,14 @@
print(f"PipelineRun Namespace .... {pipelineRunNamespace}")
print(f"Status ................... {pipelineStatus}")

print("\nMongoDb integration enabled (v2 data model)")

if "" in [instanceId, build, pipelineName, pipelineStatus, pipelineRunName, pipelineRunNamespace]:
print("Pipeline status not recorded because one or more required env vars are not set")
sys.exit(0)

runId = f"{instanceId}:{build}"

# Connect to mongoDb
client = MongoClient(os.getenv("DEVOPS_MONGO_URI"))
db = client.masfvt
Expand All @@ -55,16 +137,19 @@
f"pipelines.{pipelineName}.status": "Started",
f"pipelines.{pipelineName}.timestamp": datetime.now(UTC)
}

elif pipelineStatus in ["Completed", "Succeeded"]:
updates = {
f"pipelines.{pipelineName}.status": "Completed",
f"pipelines.{pipelineName}.timestampFinished": datetime.now(UTC)
}

elif pipelineStatus == "Failed":
updates = {
f"pipelines.{pipelineName}.status": "Failed",
f"pipelines.{pipelineName}.timestampFinished": datetime.now(UTC)
}

else:
print("Unexpected state detected")
sys.exit(0)
Expand All @@ -85,3 +170,5 @@
},
upsert=True
)

print("Pipeline status recorded in MongoDB successfully")
4 changes: 4 additions & 0 deletions image/cli/mascli/functions/internal/save_config
Original file line number Diff line number Diff line change
Expand Up @@ -252,5 +252,9 @@ export MAS_MANUAL_CERT_MGMT=$MAS_MANUAL_CERT_MGMT
# Guided Tour
export MAS_ENABLE_WALKME=$MAS_ENABLE_WALKME

# Slack
export SLACK_TOKEN=$SLACK_TOKEN
export SLACK_CHANNEL=$SLACK_CHANNEL

EOF
}
1 change: 0 additions & 1 deletion python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ lint: venv
pyinstaller: venv
rm -f README.rst
. .venv/bin/activate && pyinstaller src/mas-upgrade --onefile --noconfirm --add-data="src/mas/devops/templates/ibm-mas-tekton.yaml:mas/devops/templates" --add-data="src/mas/devops/templates/subscription.yml.j2:mas/devops/templates/" --add-data="src/mas/devops/templates/pipelinerun-upgrade.yml.j2:mas/devops/templates/"

4 changes: 3 additions & 1 deletion python/src/mas/cli/aiservice/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,9 @@ def install(self, argv):
slsLicenseFile=self.slsLicenseFileSecret,
additionalConfigs=self.additionalConfigsSecret,
podTemplates=self.podTemplatesSecret,
certs=self.certsSecret
certs=self.certsSecret,
slack_token=self.getParam("slack_token"),
slack_channel=self.getParam("slack_channel")
)

self.setupApprovals(pipelinesNamespace)
Expand Down
4 changes: 4 additions & 0 deletions python/src/mas/cli/aiservice/install/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,8 @@

# Enable IPv6 networking
"enable_ipv6",

# Slack
"slack_token",
"slack_channel",
]
10 changes: 10 additions & 0 deletions python/src/mas/cli/aiservice/install/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,13 @@ def mongoSummary(self) -> None:
else:
self.fatalError(f"Unexpected value for mongodb_action parameter: {self.getParam('mongodb_action')}")

def slackSummary(self) -> None:
self.printH2("Slack Integration")
if self.getParam("slack_channel") != "":
self.printParamSummary("Slack Channel", "slack_channel")
else:
self.printSummary("Slack Channel", "Not Configured")

def displayInstallSummary(self) -> None:
self.printH1("Review Settings")
self.printDescription([
Expand All @@ -129,3 +136,6 @@ def displayInstallSummary(self) -> None:
self.slsSummary()
self.mongoSummary()
self.db2Summary()

# Notification Integration
self.slackSummary()
4 changes: 3 additions & 1 deletion python/src/mas/cli/install/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2120,7 +2120,9 @@ def install(self, argv):
slsLicenseFile=self.slsLicenseFileSecret,
additionalConfigs=self.additionalConfigsSecret,
podTemplates=self.podTemplatesSecret,
certs=self.certsSecret
certs=self.certsSecret,
slack_token=self.getParam("slack_token"),
slack_channel=self.getParam("slack_channel")
)

self.setupApprovals(pipelinesNamespace)
Expand Down
5 changes: 5 additions & 0 deletions python/src/mas/cli/install/argBuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,11 @@ def buildCommand(self) -> str:
if self.getParam('approval_aiservice') != "":
command += f" --approval-aiservice \"{self.getParam('approval_aiservice')}\"{newline}"

# Slack
# -----------------------------------------------------------------------------
if self.getParam('slack_channel') != "" and self.getParam('slack_token'):
command += f" --slack-channel \"{self.getParam('slack_channel')}\" --slack-token $SLACK_TOKEN{newline}"

# More Options
# -----------------------------------------------------------------------------
if self.devMode:
Expand Down
12 changes: 12 additions & 0 deletions python/src/mas/cli/install/argParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1581,6 +1581,18 @@ def isValidFile(parser: argparse.ArgumentParser, arg: str) -> str:
default=False,
help="Don't show advanced install options (in interactive mode)"
)
otherArgGroup.add_argument(
"--slack-token",
dest="slack_token",
required=False,
help="Slack bot token for sending pipeline notifications"
)
otherArgGroup.add_argument(
"--slack-channel",
dest="slack_channel",
required=False,
help="Slack channel(s) for notifications (comma-separated for multiple channels)"
)

otherArgGroup.add_argument(
"--accept-license",
Expand Down
6 changes: 5 additions & 1 deletion python/src/mas/cli/install/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,5 +221,9 @@
# Grafana
"skip_grafana_install",
"grafana_v5_namespace",
"grafana_instance_storage_size"
"grafana_instance_storage_size",

# Slack Integration
"slack_token",
"slack_channel"
]
10 changes: 10 additions & 0 deletions python/src/mas/cli/install/summarizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,13 @@ def grafanaSummary(self) -> None:
else:
self.printSummary("Install Grafana", "Do Not Install")

def slackSummary(self) -> None:
self.printH2("Slack Integration")
if self.getParam("slack_channel") != "":
self.printParamSummary("Slack Channel", "slack_channel")
else:
self.printSummary("Slack Channel", "Not Configured")

def installSummary(self) -> None:
pass
# self.printH2("Install Process")
Expand Down Expand Up @@ -451,5 +458,8 @@ def displayInstallSummary(self) -> None:
self.cp4dSummary()
self.grafanaSummary()

# Notification Integration
self.slackSummary()

# Install options
self.installSummary()
4 changes: 4 additions & 0 deletions python/src/mas/cli/uninstall/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ def uninstall(self, argv):
droNamespace = args.dro_namespace
self.noConfirm = args.no_confirm

# Set image_pull_policy if provided
if args.image_pull_policy and args.image_pull_policy != "":
self.setParam("image_pull_policy", args.image_pull_policy)

if args.uninstall_all_deps:
uninstallGrafana = True
uninstallIBMCatalog = True
Expand Down
Loading
Loading