Adds Linuxserver/deluge with openvpn
This commit is contained in:
parent
ffe4fc9103
commit
5f9fbf3326
59
build-deluge.jenkins
Normal file
59
build-deluge.jenkins
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
def nodeLabel = "${UUID.randomUUID().toString()}"
|
||||||
|
def repository = "registry.test-chamber-13.lan"
|
||||||
|
def kanikoImage = "${repository}/nhyatt/kaniko:latest"
|
||||||
|
def repositoryCreds = "quay-repository-creds"
|
||||||
|
|
||||||
|
podTemplate(
|
||||||
|
name: "pipelineContainer",
|
||||||
|
label: nodeLabel,
|
||||||
|
yaml: """---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Pod
|
||||||
|
metadata:
|
||||||
|
name: kaniko
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- name: kaniko
|
||||||
|
image: ${kanikoImage}
|
||||||
|
imagePullPolicy: Always
|
||||||
|
tty: true
|
||||||
|
command:
|
||||||
|
- /busybox/cat
|
||||||
|
""") {
|
||||||
|
node (nodeLabel) {
|
||||||
|
stage ("Prepare Kaniko") {
|
||||||
|
container ("kaniko") {
|
||||||
|
withCredentials([usernameColonPassword(
|
||||||
|
credentialsId: repositoryCreds,
|
||||||
|
variable: "dCreds",
|
||||||
|
)]) {
|
||||||
|
def dockerJSON = """{
|
||||||
|
"auths": {
|
||||||
|
"${repository}": {
|
||||||
|
"auth": "${dcreds.bytes.encodeBase64().toString()}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}"""
|
||||||
|
sh """
|
||||||
|
set +x
|
||||||
|
echo '${dockerJSON}' > /kaniko/.docker/config.json
|
||||||
|
"""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Build Container') {
|
||||||
|
container('kaniko') {
|
||||||
|
|
||||||
|
def dockerfile = """FROM linuxserver/deluge:amd64-latest
|
||||||
|
RUN apt-get update && \\
|
||||||
|
apt-get install -y openvpn && \\
|
||||||
|
rm -rf /tmp/* /var/lib/apt/lists/* /var/tmp/*
|
||||||
|
"""
|
||||||
|
|
||||||
|
writeFile file: workspace + '/Dockerfile', text: dockerfile
|
||||||
|
sh "/kaniko/executor --context \"${workspace}\" -f \"${workspace}/Dockerfile\" --destination \"${repository}/nhyatt/deluge:latest\""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user