Adds dockerfile contents.
This commit is contained in:
parent
d674162b08
commit
64a4bcdb05
@ -64,6 +64,21 @@ spec:
|
|||||||
stage("Kaniko Build & Push") {
|
stage("Kaniko Build & Push") {
|
||||||
container ("kaniko") {
|
container ("kaniko") {
|
||||||
def dockerfile = """
|
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 + "/${caName}", text: caContent)
|
||||||
writeFile (file: workspace + "/Dockerfile", text: dockerfile)
|
writeFile (file: workspace + "/Dockerfile", text: dockerfile)
|
||||||
|
Reference in New Issue
Block a user