Compare commits

...

2 Commits

Author SHA1 Message Date
cdb4186a6d test pas sur du tout
Some checks failed
Web/ip/pipeline/head There was a failure building this commit
web/ip/pipeline/head There was a failure building this commit
2021-02-12 16:16:53 -05:00
2b926f0b3b test
Some checks reported errors
Web/ip/pipeline/head Something is wrong with the build of this commit
2021-02-12 16:04:45 -05:00
2 changed files with 34 additions and 4 deletions

16
Jenkinsfile vendored
View File

@ -2,10 +2,16 @@ pipeline {
environment { environment {
registry = 'https://registry.hub.docker.com' registry = 'https://registry.hub.docker.com'
registryCredential = 'dockerhub_jcabillot' registryCredential = 'dockerhub_jcabillot'
dockerImage = 'jcabillot/ip' dockerImage = 'jcabillot/ip:arm64'
} }
agent any //agent any
agent {
kubernetes {
defaultContainer 'docker' // All `steps` instructions will be executed by this container
yamlFile 'Jenkinsfile-pod-template.yml'
}
}
triggers { triggers {
cron('@midnight') cron('@midnight')
@ -14,13 +20,15 @@ pipeline {
stages { stages {
stage('Clone repository') { stage('Clone repository') {
steps{ steps{
checkout scm container('jnlp') {
checkout scm
}
} }
} }
stage('Build image') { stage('Build image') {
steps{ steps{
sh 'docker build --force-rm=true --no-cache=true --pull -t ${dockerImage} .' sh 'docker build --build-arg VERSION=arm64 --force-rm=true --no-cache=true --pull -t ${dockerImage} .'
} }
} }

View 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