Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
388 commits
Select commit Hold shift + click to select a range
a41d031
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
3202e7f
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
1ef3b4a
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
fed4b88
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
a6f3e7a
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
93d37f2
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
c151463
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
4a24276
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
2ee5586
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
d86c3d5
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
dde6849
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
68a1ba0
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
5cc734d
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
541eed1
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
d7c679a
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
f640ea1
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
0cb7fb3
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
c15e841
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
9ee2f2b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
53654c4
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
52fb3b8
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
2070a09
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
2bb2b67
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
6ed1917
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
1a59e91
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
6bd7c9e
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
44303ee
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
05c0cf8
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
cd39d90
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
ea1d8fa
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
4cb3775
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
52d0491
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
d58d44a
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
fb1acaa
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
e7e8eca
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
9da8352
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
244d14d
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
5e1003f
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
bf2055f
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
d82fbe3
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
8ec54c0
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
e13a2cc
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
ea24f7b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
b62f1a0
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
444e277
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
856f86d
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
243f7c9
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
341361b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
a6d3267
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
a360b6e
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
8d79b57
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
b47c8ee
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
435e97b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
27988b5
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
57b3a5c
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
8b8c171
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
feb78fe
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
f814255
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
3dc76ad
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
3008f45
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
94fe512
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
46aa573
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
a92ebb8
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
de0b98a
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
d765fdd
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
8bf9764
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
5273fcc
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
98361dd
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
96b0778
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 27, 2025
bb13160
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
6d1b786
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
e20bdec
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
d204b90
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
a380967
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
e7f155b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
5aea81b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
3ec77b2
Create docker-image-v4.yml
rhdmalone Jun 30, 2025
6bfe5e7
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
4180526
Create docker-image-v5.yml
rhdmalone Jun 30, 2025
6fe137b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
9827084
Create docker-image-v6.yml
rhdmalone Jun 30, 2025
4c021f9
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
c6e4af4
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
b613017
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
8c1d83c
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
90ca1a7
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
f5d9913
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
3e41bf8
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
c672eec
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
2050351
Vault integration
rh-akhatavk Jun 30, 2025
71a9a27
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
853c71d
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
e062031
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
0ec1518
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
a7ea8e5
Changed sts client creation to pick values from config variable, not env
rh-akhatavk Jun 30, 2025
3bb2994
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
04bdee5
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
a8ceae1
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
8fb7a74
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
e75e9df
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
463ef00
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
ee03441
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
a2a5dcf
Merge pull request #30 from rissh/feat/openstack-create-vms
prabhapa Jun 30, 2025
ef13bc9
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
4e82635
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
7c91771
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
5bfb4f8
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
690ada0
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
cc2894d
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
b2137fc
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
12a7500
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
5d35184
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
4fcd986
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
740abd9
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
6bc1c90
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
67dea38
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
7f398a9
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
8f79bce
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
c6ca2d6
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
e954e5f
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
216b433
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
7eb4be9
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
9a5243b
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
6ad2141
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
2711932
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
79ca60a
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
e741c19
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
e398c3b
Merge branch 'main' into vault-integration
rh-akhatavk Jun 30, 2025
ce1e249
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
ea8e13a
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
4fb067d
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
98e35a0
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
03e82f2
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
8d1259f
Merge branch 'openshift-sustaining:main' into main
rhdmalone Jun 30, 2025
62c5487
Changed tests
rh-akhatavk Jul 1, 2025
23544fb
Added dynaconf to requirements
rh-akhatavk Jul 1, 2025
ad39cee
Revert "Changed tests"
rh-akhatavk Jul 1, 2025
6c32cdf
Added new env variables to tests
rh-akhatavk Jul 1, 2025
4b4e5d6
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 1, 2025
61384af
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 1, 2025
a3b09df
SUSTAINING-754 - create docker build pipeline
rhdmalone Jun 30, 2025
6056fe3
Merge pull request #35 from rhdmalone/main_20250630
prabhapa Jul 1, 2025
8606068
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 1, 2025
7814acc
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 1, 2025
3f58068
Added a way to override vault data using env vars
rh-akhatavk Jul 1, 2025
cef0195
Linter changes
rh-akhatavk Jul 1, 2025
c234781
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 1, 2025
dc5b90e
Added exception specific handling
rh-akhatavk Jul 1, 2025
272d675
Merge branch 'main' into main
rhdmalone Jul 1, 2025
6846649
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 1, 2025
5d16233
Merge pull request #36 from rhdmalone/main
prabhapa Jul 2, 2025
b9a150e
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 2, 2025
4de79c4
Merge branch 'main' of github.com:rhdmalone/ocp-sustaining-bot
rhdmalone Jul 2, 2025
991e3d3
SUSTAINING-754 - create docker build pipeline
rhdmalone Jul 2, 2025
82af349
SUSTAINING-754 - create docker build pipeline - adding build-args
rhdmalone Jul 2, 2025
9cf196a
Revert "SUSTAINING-754 - create docker build pipeline - adding build-…
rhdmalone Jul 2, 2025
c89ee82
Removed bare except
rh-akhatavk Jul 2, 2025
e3cb162
Fixed test failures caused because of network error
rh-akhatavk Jul 2, 2025
8f57484
Merge pull request #37 from rhdmalone/main
prabhapa Jul 3, 2025
126428b
Merge pull request #34 from rh-akhatavk/vault-integration
prabhapa Jul 3, 2025
d3bc5b4
SUSTAINING-1093 reorganise code so that the dictionary of params is c…
rhdmalone Jul 3, 2025
12bb837
Merge branch 'main' into SUSTAINING-1093-ParamsDict
rhdmalone Jul 4, 2025
faf3bd9
Update and add unit tests for OpenStack create_vm and list_vms functions
rissh Jul 3, 2025
b1ee223
Clean up redundant comments in OpenStack VM test cases
rissh Jul 4, 2025
9e7b807
Merge pull request #38 from rissh/test/update-openstack-vm-tests
prabhapa Jul 7, 2025
b2b1fd9
Merge branch 'main' into SUSTAINING-1093-ParamsDict
rhdmalone Jul 7, 2025
feef45e
Added fallback for no vault related environment variables
rh-akhatavk Jul 7, 2025
52547a1
Merge pull request #40 from rh-akhatavk/vault-integration
rh-akhatavk Jul 7, 2025
279d874
README.MD updates 7th July 2025
rhdmalone Jul 7, 2025
a7e3218
Dynaconf treats ALLOW_ALL_WORKSPACE_USERS setting as an int, so the c…
rhdmalone Jul 7, 2025
c4a0187
Merge pull request #42 from rhdmalone/allow-all-workspace-users
prabhapa Jul 8, 2025
8ba4369
Merge branch 'main' into readme_updates_dmv1
rhdmalone Jul 8, 2025
857f5e8
Merge pull request #41 from rhdmalone/readme_updates_dmv1
rhdmalone Jul 8, 2025
05fdea3
SUSTAINING-967- changed to list important team links command
katekeiroz-dev Jul 8, 2025
a6a5b20
Merge branch 'main' into SUSTAINING-1093-ParamsDict
rhdmalone Jul 8, 2025
92f1743
Merge pull request #39 from rhdmalone/SUSTAINING-1093-ParamsDict
rhdmalone Jul 8, 2025
c6fc6c0
Rename TEAM_LINKS to USEFUL_PROJECT_LINKS and update handler
katekeiroz-dev Jul 8, 2025
aa5269f
add new command aws-modify-vm
de1987 Jun 25, 2025
bc3401d
Merge pull request #33 from de1987/feature-aws-modify-vm
prabhapa Jul 9, 2025
ce54b54
Merge branch 'main' into team-links
katekeiroz-dev Jul 9, 2025
96cd9cd
Merge pull request #43 from katekeiroz-dev/team-links
prabhapa Jul 10, 2025
80c6183
add test step for slack handlers
de1987 Jul 14, 2025
9ac5218
Merge pull request #45 from de1987/test-step-slack-handlers
prabhapa Jul 15, 2025
12c0144
Refactor help command to display dynamic list of registered Slackbot …
rissh Jul 14, 2025
bb50eb4
Removed un-used import
rissh Jul 14, 2025
54dca87
Optimize help system: cache commands, centralize help checks
rissh Jul 14, 2025
8f0015b
Refine help system: rename 'decorator', review instance types for AWS
rissh Jul 15, 2025
fbb6bb9
Add static choices for OpenStack flavor field in help metadata
rissh Jul 16, 2025
29388d4
Merge pull request #44 from rissh/feat/slackbot-help-refactor
prabhapa Jul 17, 2025
70e0175
Added openstack keypair generation and rebased on top of master branch
rh-akhatavk Jul 15, 2025
ec4222e
Added checks for empty variables
rh-akhatavk Jul 16, 2025
3b3d7c7
Removed unused variable
rh-akhatavk Jul 17, 2025
3c50b28
Refactored to comply with new `help` command
rh-akhatavk Jul 17, 2025
7b63447
Linter changes
rh-akhatavk Jul 17, 2025
a03b56f
Merge pull request #46 from rh-akhatavk/openstack-keypair
prabhapa Jul 17, 2025
69d4114
allow parameters that are not key/value pairs at the start of the sub…
rhdmalone Jul 22, 2025
a811f83
allow parameters that are not key/value pairs at the start of the sub…
rhdmalone Jul 23, 2025
02ed3a8
Merge pull request #50 from rhdmalone/allow-params-no-hyphens
prabhapa Jul 25, 2025
35a7748
SUSTAINING-949: add trivy scan to docker image creation workflow
rhdmalone Jul 25, 2025
fa6d69a
Merge pull request #52 from rhdmalone/trivy-scan2
prabhapa Jul 25, 2025
237e15d
Update create-slackbot-docker-image.yml
prabhapa Jul 25, 2025
8c4d547
Update build pipeline with simple trivy gating
prabhapa Jul 25, 2025
ce6876e
Update create-slackbot-docker-image.yml
prabhapa Jul 25, 2025
666ab2f
refactor: commands pattern
de1987 Jul 23, 2025
595d628
Merge pull request #51 from de1987/sustaining-1113-commands-pattern
prabhapa Jul 30, 2025
e2aa78c
feat(openstack): Added stop, start and delete Openstack VM commond su…
rissh Jul 31, 2025
da92b43
test(openstack): add tests for stop, start and delete Openstack VM co…
rissh Jul 31, 2025
5d9379d
test(openstack): Add handler tests for stop, start and delete Opensta…
rissh Jul 31, 2025
f3546d0
test(openstack): Handles some ruff changes
rissh Jul 31, 2025
8d83bf4
Added rota integration
rh-akhatavk Aug 6, 2025
5ebbd7b
linting changes
rh-akhatavk Aug 6, 2025
00688d6
Added help for rota
rh-akhatavk Aug 12, 2025
8062110
Fixed tests
rh-akhatavk Aug 12, 2025
3839f1e
linting changes
rh-akhatavk Aug 12, 2025
7d0d7d7
Added a new changes in the list-team-links
Jul 31, 2025
bc9d61c
Merge pull request #54 from UdayYendva/imp_team_links
prabhapa Aug 13, 2025
fa5e700
Update tests/test_runner.py
rh-akhatavk Aug 13, 2025
19785ef
Update pr-checks.yaml
prabhapa Aug 13, 2025
c4aad01
Merge pull request #53 from rissh/feat/openstack-vm-actions
prabhapa Aug 13, 2025
1d1a25a
add linter ignore
rh-akhatavk Aug 14, 2025
87d7d07
Merge branch 'main' into rota-integration
rh-akhatavk Aug 14, 2025
293e815
linting changes
rh-akhatavk Aug 14, 2025
96d86b2
Merge pull request #55 from rh-akhatavk/rota-integration
prabhapa Aug 18, 2025
2c5efc6
cenrtificate text variable is not working in the current shape.For th…
prabhapa Aug 18, 2025
17169df
commented the cert printing for sec reasons
prabhapa Aug 18, 2025
e04b4a7
formatting + github workflow fix
prabhapa Aug 18, 2025
07ab278
cater for the case where the gsheet config items are not yet setup in…
rhdmalone Aug 18, 2025
e8c3b18
lint fix
rhdmalone Aug 18, 2025
9465843
Merge pull request #58 from rhdmalone/main
prabhapa Aug 19, 2025
499ab9a
Merge pull request #57 from openshift-sustaining/rh-cert-fix
prabhapa Aug 19, 2025
ff95e11
Added logging back
rh-akhatavk Aug 19, 2025
15769d8
Merge pull request #59 from rh-akhatavk/logging-fix
prabhapa Aug 19, 2025
2383a71
quick gsheet import fix
rh-akhatavk Aug 20, 2025
d95b9b2
Merge pull request #60 from rh-akhatavk/quick-gsheet-fix
prabhapa Aug 20, 2025
d13cbe9
local cleanup
rhdmalone Sep 3, 2025
29a23e7
Update .github/workflows/create-slackbot-docker-image.yml
rhdmalone Sep 5, 2025
9707c99
additional checks for rota command
rh-akhatavk Sep 9, 2025
d070829
Added a way to handle `N/A` in release version
rh-akhatavk Sep 10, 2025
c7e4346
Merge pull request #62 from rh-akhatavk/fix_rota_minor_errors
prabhapa Sep 17, 2025
1916586
Merge branch 'main' into main
rhdmalone Oct 7, 2025
5266507
Merge pull request #61 from rhdmalone/main
prabhapa Oct 8, 2025
f09d448
Quick fix if rota variables are not present in `.env`
rh-akhatavk Oct 10, 2025
080d248
lint fix
rh-akhatavk Oct 10, 2025
6dccfd0
Merge pull request #63 from rh-akhatavk/gsheet-fallback
prabhapa Oct 10, 2025
eab0f6c
rota_workflow
katekeiroz-dev Oct 21, 2025
7d34ef0
feat(rota): implement automated reminder system with slack-worker se…
katekeiroz-dev Oct 22, 2025
dd26d2a
folder organised
katekeiroz-dev Oct 22, 2025
30f1ff3
rota workers
katekeiroz-dev Nov 3, 2025
054c90a
rota
katekeiroz-dev Nov 3, 2025
be16fcb
smartsheet test
Nov 11, 2025
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
135 changes: 135 additions & 0 deletions .github/workflows/create-slackbot-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Create Docker Image for Slackbot
on:
workflow_dispatch:
inputs:
quay_registry_username:
description: 'Username'
required: true
quay_registry_password:
description: 'Password'
required: true
tag_major_version:
description: 'Major Version'
required: true
default: "1"
tag_minor_version:
description: 'Minor Version'
required: true
default: "1"
push_when_critical_errors_in_scan:
description: 'Push when Critical Errors in Scan'
required: true
default: "false"
type: choice
options:
- "true"
- "false"
permissions:
contents: read
security-events: write
jobs:
build-and-push:
runs-on: ubuntu-latest
env:
IMAGE_NAME: "quay.io/ocp_sustaining_engineering/slack_backend"
TAG_PATCH_VERSION: 0
SLACKBOT_IMAGE_REPO_URL: "https://quay.io/api/v1/repository/ocp_sustaining_engineering/slack_backend/tag/"
steps:
- name: Validate inputs
run: |
if ! [[ "${{ inputs.tag_major_version }}" =~ ^[0-9]+$ ]]; then
echo "Major version must be numeric"
exit 1
fi
if ! [[ "${{ inputs.tag_minor_version }}" =~ ^[0-9]+$ ]]; then
echo "Minor version must be numeric"
exit 1
fi
- name: Checkout code
uses: actions/checkout@v4
- name: Get Next Tag Version
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 3
retry_on: error
command: |
PAGE=1
LIMIT=50
HAS_MORE=true
ALL_TAGS='[]'
FILTER_PARAMS="&onlyActiveTags=1&filter_tag_name=like:${{ inputs.tag_major_version }}.${{ inputs.tag_minor_version }}."
while [ "$HAS_MORE" = true ]; do
echo "Fetching page $PAGE..."
PAGE_AND_LIMIT_PARAMS="?limit=$LIMIT&page=$PAGE"
if ! JSON_RESPONSE=$(curl -s -f --max-time 300 "$SLACKBOT_IMAGE_REPO_URL$PAGE_AND_LIMIT_PARAMS$FILTER_PARAMS"); then
echo "Failed to fetch tags from API"
exit 1
fi
TAGS=$(echo "$JSON_RESPONSE" | jq '.tags')
ALL_TAGS=$(jq -s 'add' <(echo "$ALL_TAGS") <(echo "$TAGS"))
HAS_MORE=$(echo "$JSON_RESPONSE" | jq '.has_additional')
PAGE=$((PAGE + 1))
done
COUNT_EXISTING=$(echo "$ALL_TAGS" | jq '. | length')
if [ "$COUNT_EXISTING" -eq 0 ]; then
NEXT_TAG_VERSION="${{ inputs.tag_major_version }}.${{ inputs.tag_minor_version }}.${{ env.TAG_PATCH_VERSION }}"
else
MAX_VER=$(echo "$ALL_TAGS" | jq -r '.[].name'| sort -V | tail -n1)
IFS='.' read -r MAJOR MINOR PATCH <<< "$MAX_VER"
NEW_PATCH=$((PATCH + 1))
NEXT_TAG_VERSION="${{ inputs.tag_major_version }}.${{ inputs.tag_minor_version }}.${NEW_PATCH}"
fi
echo "NEXT_TAG_VERSION=$NEXT_TAG_VERSION" >> $GITHUB_ENV
echo "Computed image version: $NEXT_TAG_VERSION"
- name: Login to Quay.io
id: login
run: |
set -e
QUAY_PASSWORD=$(jq -r '.inputs.quay_registry_password' $GITHUB_EVENT_PATH)
echo ::add-mask::$QUAY_PASSWORD
QUAY_USERNAME=$(jq -r '.inputs.quay_registry_username' $GITHUB_EVENT_PATH)
echo ::add-mask::$QUAY_USERNAME
echo ":closed_lock_with_key: Logging in to quay.io..."
echo "$QUAY_PASSWORD" | docker login quay.io -u "$QUAY_USERNAME" --password-stdin
- name: Build Docker image locally
uses: docker/build-push-action@v5
with:
context: .
push: false
tags: ${{ env.IMAGE_NAME }}:${{ env.NEXT_TAG_VERSION }}
load: true
timeout-minutes: 30
- name: Trivy scan gating
run: |
if [ "$PUSH_ON_CRITICAL" == "true" ]; then
EXIT_CODE=0
else
EXIT_CODE=1
fi

echo "Using Trivy exit code: $EXIT_CODE"

docker run --rm -v /var/run/docker.sock:/var/run/docker.sock \
aquasec/trivy:latest image \
--severity CRITICAL \
--format table \
--exit-code $EXIT_CODE \
${{ env.IMAGE_NAME }}:${{ env.NEXT_TAG_VERSION }}
env:
PUSH_ON_CRITICAL: ${{ inputs.push_when_critical_errors_in_scan }}

- name: Push Docker image to Quay
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ env.IMAGE_NAME }}:${{ env.NEXT_TAG_VERSION }}

- name: Clean up
if: ${{ always() }}
run: |
echo ":wastebasket: Removing temporary file etc"
rm -f /home/runner/.docker/config.json
docker logout quay.io || true

59 changes: 40 additions & 19 deletions .github/workflows/pr-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,47 @@ jobs:
echo "✅ No .env files detected."
fi

# run-entrypoint:
# name: Test Python Entrypoint
# runs-on: ubuntu-latest
tests:
name: Tests
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Get changed files
id: changed
run: |
echo "CHANGED=$(git diff --name-only origin/${{ github.base_ref }} | tr '\n' ' ')" >> $GITHUB_ENV

- name: Setup python requirements
if: contains(env.CHANGED, 'sdk/') || contains(env.CHANGED, 'tests/') || contains(env.CHANGED, 'slack_handlers/') || contains(env.CHANGED, 'api/') || contains(env.CHANGED, '/')
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

# steps:
# - name: Checkout Code
# uses: actions/checkout@v3
- name: Test SDK AWS
if: contains(env.CHANGED, 'sdk/aws/') || contains(env.CHANGED, 'sdk/tests/')
run: |
python -m pytest sdk/tests/test_runner.py::TestRunner::test_aws

# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: 3.12
- name: Test SDK OpenStack
if: contains(env.CHANGED, 'sdk/openstack/') || contains(env.CHANGED, 'sdk/tests/')
run: |
python -m pytest sdk/tests/test_runner.py::TestRunner::test_openstack

# - name: Install Dependencies
# run: |
# python -m pip install --upgrade pip
# # Install project dependencies
# pip install -r requirements.txt
- name: Test SDK Tools
if: contains(env.CHANGED, 'sdk/tools/') || contains(env.CHANGED, 'sdk/tests/')
run: |
python -m pytest sdk/tests/test_runner.py::TestRunner::test_tools

# - name: Run Entrypoint
# run: |
# export $(grep -v '^#' vars | xargs)
# python -c "import slack_main" || exit 1
- name: Test Slack Handlers
if: (contains(env.CHANGED, 'tests/') && !contains(env.CHANGED, 'sdk/')) || contains(env.CHANGED, 'slack_handlers/')
run: |
python -m pytest tests/test_runner.py::TestRunner::test_handlers

- name: Test Slack Commands
run: |
python -m pytest tests/test_runner.py::TestRunner::test_slack_commands
20 changes: 19 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# Byte-compiled / optimized / DLL files
__pycache__/

# Unit test / coverage reports
.pytest_cache/

# Environments
.env
.venv
env/
venv/

# IDE settings
.idea/
.vscode/

# Ruff stuff:
.ruff_cache/
__pycache__/

# Mac OS
.DS_Store
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @prabhapa
24 changes: 19 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@

FROM python:3.9-slim
FROM python:3.12-alpine

WORKDIR /app

COPY . /app
# Copy files and directories separately to ensure proper structure
COPY requirements.txt config.py slack_main.py /app/
COPY sdk /app/sdk/
COPY slack_handlers /app/slack_handlers/

# Install build dependencies, upgrade security-critical packages, then install Python packages
RUN apk add --no-cache --virtual .build-deps gcc musl-dev linux-headers python3-dev \
&& apk upgrade libcrypto3 libssl3 sqlite-libs \
&& pip install --no-cache-dir -r requirements.txt \
&& apk del .build-deps

# Verify sqlite-libs version (for security audit)
RUN apk info sqlite-libs && echo "✅ sqlite-libs version verified"

RUN pip install --no-cache-dir -r requirements.txt
# Remove sqlite binary tools (sqlite-libs must remain as Python dependency)
# Note: sqlite-libs cannot be removed from Alpine Python - it's a core Python dependency
RUN apk del sqlite || true

CMD ["python", "slack_main.py"]
# Run the app
CMD ["python", "slack_main.py"]
Loading