2 Commits

Author SHA1 Message Date
Julien Cabillot e9d0a63bc8 . 2 weeks ago
Julien Cabillot 4837a1a8cd Use k3s 2 weeks ago
2 changed files with 30 additions and 2 deletions
Split View
  1. 10
      Jenkinsfile
  2. 22
      Jenkinsfile-pod-template.yml

10
Jenkinsfile

@ -2,10 +2,16 @@ pipeline {
environment {
registry = 'https://registry.hub.docker.com'
registryCredential = 'dockerhub_jcabillot'
dockerImage = 'jcabillot/phpapache'
dockerImage = 'jcabillot/phpapache:arm64'
}
agent any
//agent { label 'arm64' }
agent {
kubernetes {
defaultContainer 'docker' // All `steps` instructions will be executed by this container
yamlFile 'Jenkinsfile-pod-template.yml'
}
}
triggers {
cron('@midnight')

22
Jenkinsfile-pod-template.yml

@ -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…
Cancel
Save