Skip to content

Commit 26272b3

Browse files
authored
fix(CI): use ephemeral deployer script for Kessel deployment (#2773)
**Fix ephemeral namespace not released after QE smoke tests** - The Kessel deploy stage was manually reserving a namespace and running `bonfire deploy` inline, bypassing `deploy_ephemeral_env.sh` — which means `_common_deploy_logic.sh` was never sourced and its `teardown` trap (`trap teardown EXIT ERR SIGINT SIGTERM`) was never registered, leaving the ephemeral namespace alive after the job finished - Replace the inline namespace reservation + `bonfire deploy` block with `deploy_ephemeral_env.sh`, which handles both deployment and guaranteed namespace cleanup on exit (pass or fail) - All Kessel-specific deploy arguments are expressed through the script's supported env vars: - `APP_NAME` — deploys the full Kessel stack (`host-inventory kessel rbac compliance`) - `IMAGE` / `IMAGE_TAG` — compliance-backend image (pipeline env + short SHA override) - `COMPONENT_NAME` — drives `--set-template-ref compliance=<sha>` via `_common_deploy_logic.sh` - `OPTIONAL_DEPS_METHOD=all` - `EXTRA_DEPLOY_ARGS` — carries the RBAC image/template refs and all `-p` params for rbac, kessel-relations, and host-inventory [RHINENG-26954](https://redhat.atlassian.net/browse/RHINENG-26954) [RHINENG-26954]: https://redhat.atlassian.net/browse/RHINENG-26954?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
2 parents e62bd6e + 437549f commit 26272b3

1 file changed

Lines changed: 17 additions & 27 deletions

File tree

Jenkinsfile

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -59,37 +59,27 @@ pipeline {
5959
curl -s ${CICD_URL}/bootstrap.sh > .cicd_bootstrap.sh
6060
source ./.cicd_bootstrap.sh
6161
62-
COMPLIANCE_SHA=$(git rev-parse HEAD | cut -f1)
63-
COMPLIANCE_SHORT_SHA=${COMPLIANCE_SHA:0:7}
64-
6562
RBAC_SHA=$(git ls-remote https://github.com/RedHatInsights/insights-rbac.git HEAD | cut -f1)
6663
RBAC_SHORT_SHA=${RBAC_SHA:0:7}
6764
68-
NAMESPACE=$(bonfire namespace reserve --duration 1h)
69-
oc project $NAMESPACE
70-
71-
bonfire deploy host-inventory kessel rbac compliance \
72-
--source appsre \
73-
--ref-env insights-production \
74-
--timeout 900 \
75-
--optional-deps-method all \
76-
--frontends false \
77-
--set-image-tag quay.io/cloudservices/compliance-backend=${COMPLIANCE_SHORT_SHA} \
78-
--set-template-ref compliance=${COMPLIANCE_SHA} \
79-
--set-image-tag quay.io/redhat-services-prod/hcc-accessmanagement-tenant/insights-rbac=${RBAC_SHORT_SHA} \
80-
--set-template-ref rbac=${RBAC_SHA} \
81-
-p rbac/NOTIFICATIONS_RH_ENABLED=False \
82-
-p rbac/V2_MIGRATION_APP_EXCLUDE_LIST="approval" \
83-
-p rbac/ROLE_CREATE_ALLOW_LIST="remediations,inventory,policies,advisor,vulnerability,compliance,automation-analytics,notifications,patch,integrations,ros,staleness,config-manager,idmsvc" \
84-
-p rbac/REPLICATION_TO_RELATION_ENABLED=True \
85-
-p rbac/PARITY_CHECK_INTERVAL_SECONDS=300 \
86-
-p kessel-relations/SPICEDB_QUANTIZATION_INTERVAL=2.5s \
87-
-p kessel-relations/SPICEDB_QUANTIZATION_STALENESS_PERCENT=0 \
88-
-p host-inventory/BYPASS_RBAC=false \
89-
-p host-inventory/BYPASS_KESSEL=false \
90-
-n $NAMESPACE
65+
export APP_NAME="host-inventory kessel rbac compliance"
66+
export IMAGE_TAG="${GIT_COMMIT:0:7}"
67+
export OPTIONAL_DEPS_METHOD="all"
68+
export EXTRA_DEPLOY_ARGS="
69+
--set-image-tag quay.io/redhat-services-prod/hcc-accessmanagement-tenant/insights-rbac=${RBAC_SHORT_SHA}
70+
--set-template-ref rbac=${RBAC_SHA}
71+
-p rbac/NOTIFICATIONS_RH_ENABLED=False
72+
-p rbac/V2_MIGRATION_APP_EXCLUDE_LIST=approval
73+
-p rbac/ROLE_CREATE_ALLOW_LIST=remediations,inventory,policies,advisor,vulnerability,compliance,automation-analytics,notifications,patch,integrations,ros,staleness,config-manager,idmsvc
74+
-p rbac/REPLICATION_TO_RELATION_ENABLED=True
75+
-p rbac/PARITY_CHECK_INTERVAL_SECONDS=300
76+
-p kessel-relations/SPICEDB_QUANTIZATION_INTERVAL=2.5s
77+
-p kessel-relations/SPICEDB_QUANTIZATION_STALENESS_PERCENT=0
78+
-p host-inventory/BYPASS_RBAC=false
79+
-p host-inventory/BYPASS_KESSEL=false
80+
"
81+
source "${CICD_ROOT}/deploy_ephemeral_env.sh"
9182
92-
export NAMESPACE
9383
source "${CICD_ROOT}/cji_smoke_test.sh"
9484
9585
# Update IQE plugin config to run floorist plugin tests.

0 commit comments

Comments
 (0)