Adds dockerfile contents.

This commit is contained in:
Hyatt 2020-07-18 11:31:59 -05:00
parent d674162b08
commit 64a4bcdb05
Signed by: nhyatt
GPG Key ID: C50D0BBB5BC40BEA

View File

@ -64,6 +64,21 @@ spec:
stage("Kaniko Build & Push") {
container ("kaniko") {
def dockerfile = """
FROM docker.io/sonarsource/sonar-scanner-cli:latest
USER root
COPY ${caName} /etc/ssl/private/${caName}
RUN keytool \\
-importcert \\
-noprompt \\
-alias ${caName} \\
-file /etc/ssl/private/${caName} \\
-keystore /opt/java/openjdk/lib/security/cacerts \\
-storepass "changeit"
USER scanner-cli
"""
writeFile (file: workspace + "/${caName}", text: caContent)
writeFile (file: workspace + "/Dockerfile", text: dockerfile)