-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathentrypoint.sh
More file actions
executable file
·38 lines (29 loc) · 989 Bytes
/
entrypoint.sh
File metadata and controls
executable file
·38 lines (29 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
set -e
file=$1
log_level=$2
command="validate"
params="--log-output plain"
if [ -n "$file" ]; then
params="$params -f $file"
fi
if [ ! -z "$log_level" ]; then
log_level="--log-level ${log_level}"
fi
if [ ! -z "$OKTETO_CA_CERT" ]; then
echo "Custom certificate is provided"
echo "$OKTETO_CA_CERT" > /etc/ssl/certs/okteto_ca_cert.pem
if command -v update-ca-certificates > /dev/null 2>&1; then
mkdir -p /usr/local/share/ca-certificates
cp /etc/ssl/certs/okteto_ca_cert.pem /usr/local/share/ca-certificates/okteto_ca_cert.crt
update-ca-certificates
fi
fi
# https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
if [ "${RUNNER_DEBUG}" = "1" ]; then
log_level="--log-level debug"
fi
echo running: okteto "$command" "$params $log_level"
# shellcheck disable=SC2086
okteto $command $params $log_level