This commit is contained in:
parent
6b6470ec7f
commit
c4cb23102a
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -5,7 +5,13 @@ pipeline {
|
||||
dockerImage = 'jcabillot/unrar-arm64'
|
||||
}
|
||||
|
||||
agent { label 'arm64' }
|
||||
//agent { label 'arm64' }
|
||||
agent {
|
||||
kubernetes {
|
||||
defaultContainer 'docker' // All `steps` instructions will be executed by this container
|
||||
yamlFile 'Jenkinsfile-pod-template.yml'
|
||||
}
|
||||
}
|
||||
|
||||
triggers {
|
||||
cron('@midnight')
|
||||
@ -20,7 +26,7 @@ pipeline {
|
||||
|
||||
stage('Build image') {
|
||||
steps{
|
||||
sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} .'
|
||||
sh 'docker build --force-rm=true --no-cache=true --network host --pull -t ${dockerImage} .'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
Jenkinsfile-pod-template.yml
Normal file
22
Jenkinsfile-pod-template.yml
Normal file
@ -0,0 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
labels:
|
||||
jenkins: 'true'
|
||||
spec:
|
||||
containers:
|
||||
- name: jnlp
|
||||
image: 'jcabillot/docker-inbound-agent-arm64'
|
||||
- name: docker
|
||||
image: docker:20.10-dind
|
||||
securityContext:
|
||||
privileged: true
|
||||
#volumeMounts:
|
||||
#- mountPath: '/var/run/docker.sock'
|
||||
# name: docker-socket
|
||||
#volumes:
|
||||
#- name: docker-socket
|
||||
# hostPath:
|
||||
# path: '/var/run/docker.sock'
|
||||
securityContext:
|
||||
runAsUser: 0
|
||||
Loading…
x
Reference in New Issue
Block a user