Try to fix the build
Some checks failed
Homelab/jenkins-container/pipeline/head There was a failure building this commit
Some checks failed
Homelab/jenkins-container/pipeline/head There was a failure building this commit
This commit is contained in:
parent
1d9b2c8472
commit
225d34f222
@ -1,3 +1,3 @@
|
|||||||
FROM jenkins/jenkins:2.333-alpine
|
FROM jenkins/jenkins:2.346-jdk11
|
||||||
COPY --chown=jenkins:jenkins plugins.txt /usr/share/jenkins/ref/plugins.txt
|
COPY --chown=jenkins:jenkins plugins.txt /usr/share/jenkins/ref/plugins.txt
|
||||||
RUN jenkins-plugin-cli --verbose -f /usr/share/jenkins/ref/plugins.txt -d /usr/share/jenkins/ref/plugins
|
RUN jenkins-plugin-cli --verbose -f /usr/share/jenkins/ref/plugins.txt -d /usr/share/jenkins/ref/plugins
|
||||||
|
|||||||
57
Jenkinsfile
vendored
57
Jenkinsfile
vendored
@ -1,31 +1,44 @@
|
|||||||
#!/usr/bin/env groovy
|
#!/usr/bin/env groovy
|
||||||
POD_LABEL = "jenkins-builder-${UUID.randomUUID()}"
|
POD_LABEL = "jenkins-builder-${UUID.randomUUID()}"
|
||||||
REGISTRY = '10.0.96.12/jenkins'
|
REGISTRY = 'docker.thejimnicholson.com/jenkins'
|
||||||
|
|
||||||
|
podTemplate(
|
||||||
|
name: POD_LABEL,
|
||||||
|
namespace: 'jenkins',
|
||||||
|
podRetention: always
|
||||||
|
containers: [
|
||||||
|
containerTemplate(name: 'kaniko', image: 'gcr.io/kaniko-project/executor:debug', command: 'sleep', args: '30d')
|
||||||
|
],
|
||||||
|
volumes: [
|
||||||
|
secretVolume: { mountPath: '/kaniko/.docker/config.json', secretName: 'regcred'} ],
|
||||||
|
workspaceVolume: dynamicPVC()
|
||||||
|
) {
|
||||||
|
|
||||||
podTemplate(label: POD_LABEL, containers: [
|
|
||||||
containerTemplate(
|
|
||||||
name: 'kaniko',
|
|
||||||
image: 'gcr.io/kaniko-project/executor:debug',
|
|
||||||
command: 'sleep',
|
|
||||||
args: '30d'
|
|
||||||
)
|
|
||||||
], workspaceVolume: dynamicPVC()) {
|
|
||||||
node(POD_LABEL) {
|
node(POD_LABEL) {
|
||||||
stage('Checkout') {
|
stage('Checkout') {
|
||||||
checkout scm
|
checkout scm
|
||||||
}
|
}
|
||||||
container('kaniko') {
|
|
||||||
stage('Image') {
|
|
||||||
ansiColor('xterm') {
|
|
||||||
sh "/kaniko/executor \
|
|
||||||
-f `pwd`/Dockerfile \
|
|
||||||
-c `pwd` \
|
|
||||||
--insecure \
|
|
||||||
--skip-tls-verify \
|
|
||||||
--destination=${REGISTRY}/jenkins:2.333 \
|
|
||||||
--destination=${REGISTRY}/jenkins:latest"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// {
|
||||||
|
// node(POD_LABEL) {
|
||||||
|
// stage('Checkout') {
|
||||||
|
// checkout scm
|
||||||
|
// }
|
||||||
|
// container('kaniko') {
|
||||||
|
// stage('Image') {
|
||||||
|
// ansiColor('xterm') {
|
||||||
|
// sh "/kaniko/executor \
|
||||||
|
// -f `pwd`/Dockerfile \
|
||||||
|
// -c `pwd` \
|
||||||
|
// --insecure \
|
||||||
|
// --skip-tls-verify \
|
||||||
|
// --destination=${REGISTRY}/jenkins:2.346 \
|
||||||
|
// --destination=${REGISTRY}/jenkins:latest"
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user