helm-charts/charts/semaphoreui/templates/entrypoint.sh

29 lines
1011 B
Bash
Raw Permalink Normal View History

2024-10-21 16:26:17 +00:00
apiVersion: v1
kind: ConfigMap
metadata:
name: semaphoreui-entrypoint
namespace: {{ .Values.namespace | default "default" }}
labels:
{{- include "lib.labels" . | nindent 4}}
data:
entrypoint.sh: |
#!/bin/sh
echo "creating /etc/semaphore/config.json"
cp /var/semaphoreui-secret/config.json /etc/semaphore/config.json
2024-10-21 17:07:17 +00:00
if test -f /var/semaphoreui-secret/packages.txt; then
2024-10-21 16:26:17 +00:00
echo "Installing additional system dependencies"
apk add --no-cache --upgrade \
2024-10-21 17:07:17 +00:00
$(cat /var/semaphoreui-secret/packages.txt | xargs)
2024-10-21 16:26:17 +00:00
else
echo "No additional system dependencies to install"
fi
2024-10-21 17:07:17 +00:00
if test -f /var/semaphoreui-secret/requirements.txt; then
2024-10-21 16:26:17 +00:00
echo "Installing additional python dependencies"
pip3 install --upgrade \
2024-10-21 17:07:17 +00:00
-r /var/semaphoreui-secret//requirements.txt
2024-10-21 16:26:17 +00:00
else
echo "No additional python dependencies to install"
fi
echo "Starting semapore server"
exec /usr/local/bin/semaphore server --config /etc/semaphore/config.json