Add docker configs for jenkins with ssl god kill me

This commit is contained in:
Amarpreet Minhas 2020-10-13 22:56:33 -04:00
parent ab729b2c46
commit b08a231443
2 changed files with 19 additions and 0 deletions

View file

@ -10,9 +10,11 @@ RUN apk add --no-cache \
bash \
coreutils \
curl \
expect \
git \
git-lfs \
openssh-client \
openssl \
tini \
ttf-dejavu \
tzdata \

View file

@ -1,5 +1,22 @@
#! /bin/bash -e
# cert prep
for i in /secrets/jenkins.crt /etc/ssl/certs/ca-cert-MaskedName_Root_CA.pem; do
cat $i >> /tmp/jenkins_bundle.crt
echo >> /tmp/jenkins_bundle.crt
done
expect <(cat <<EOH
spawn openssl pkcs12 -inkey /secrets/jenkins.key -in /tmp/jenkins_bundle.crt -export -out /secrets/jenkins.jks
expect "Enter Export Password:"
send -- "password\r"
expect "Verifying - Enter Export Password:"
send -- "password\r"
interact
EOH
)
# defaultish jenkins stuff
: "${JENKINS_WAR:="/usr/share/jenkins/jenkins.war"}"
: "${JENKINS_HOME:="/var/jenkins_home"}"
: "${COPY_REFERENCE_FILE_LOG:="${JENKINS_HOME}/copy_reference_file.log"}"