Skip to content

Commit 896c846

Browse files
fix: refactor construct connection string script [run-ui-tests]
1 parent 1536209 commit 896c846

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN mkdir /.pysnmp && chown 10001:10001 /.pysnmp
2626
RUN chown 10001:10001 /tmp
2727
COPY --from=builder /app/.venv /app/.venv
2828
COPY entrypoint.sh /app/entrypoint.sh
29-
COPY construct-redis-url.sh /app/construct-redis-url.sh
30-
RUN chmod +x /app/construct-redis-url.sh /app/entrypoint.sh
29+
COPY construct-connection-strings.sh /app/construct-connection-strings.sh
30+
RUN chmod +x /app/construct-connection-strings.sh /app/entrypoint.sh
3131
USER 10001:10001
3232
ENTRYPOINT ["/app/entrypoint.sh"]
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#!/usr/bin/env sh
2-
# Constructs REDIS_URL and CELERY_BROKER_URL from components if not already set
2+
# Constructs Redis and MongoDB connection strings based on environment variables
3+
4+
############################
5+
### REDIS ###
6+
############################
37

48
# Detect mode
59
REDIS_MODE="${REDIS_MODE:-standalone}"
@@ -61,6 +65,10 @@ if [ -z "$REDIS_URL" ] || [ -z "$CELERY_BROKER_URL" ]; then
6165
REDIS_DEPENDENCIES="${REDIS_URL} ${CELERY_BROKER_URL}"
6266
fi
6367

68+
############################
69+
### MongoDB ###
70+
############################
71+
6472
# Build MongoDB URI from environment variables
6573
if [ -n "$MONGODB_PASSWORD" ]; then
6674
# With authentication

entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env sh
22
set -e
33
. /app/.venv/bin/activate
4-
. /app/construct-redis-url.sh
4+
. /app/construct-connection-strings.sh
55
LOG_LEVEL=${LOG_LEVEL:=INFO}
66
WORKER_CONCURRENCY=${WORKER_CONCURRENCY:=4}
77

splunk_connect_for_snmp/celery_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"queue_order_strategy": "priority",
6565
}
6666

67-
# Should be set by ./construct-redis-url.sh script
67+
# Should be set by ./construct-connection-strings.sh script
6868
redbeat_redis_url = os.getenv("REDIS_URL")
6969
broker_url = os.getenv("CELERY_BROKER_URL")
7070

ui_tests/config/ui_values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ UI:
33
frontEnd:
44
NodePort: 30001
55
repository: ghcr.io/splunk/sc4snmp-ui/frontend/container
6-
tag: "1.1.2-beta.1"
6+
tag: "1.1.2-beta.2"
77
pullPolicy: "Always"
88
backEnd:
99
NodePort: 30002
1010
repository: ghcr.io/splunk/sc4snmp-ui/backend/container
11-
tag: "1.1.2-beta.1"
11+
tag: "1.1.2-beta.2"
1212
pullPolicy: "Always"
1313
init:
1414
image: registry.access.redhat.com/ubi9/ubi

0 commit comments

Comments
 (0)