Ajouter Jenkinsfile

This commit is contained in:
jym committed 2026-09-30 11:31:41 +00:00
commit 70dcc7228c
1 file changed
+37
Vendored
+37
View File
@@ -0,0 +1,37 @@
pipeline {
agent {
kubernetes {
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: build
image: python:3.12-slim
command: ["sleep"]
args: ["infinity"]
'''
}
}
environment {
ENV_DEF = 'PRODUCTION'
}
parameters {
string(name: 'MaVar', defaultValue: 'Version 1.0', description: 'Version à livrer')
choice(name: 'Environnement', choices: ['Production', 'Pre-Prod', 'Recette'], description: 'Veuillez choisir l environnement')
}
stages {
stage('Package') {
steps {
sh 'echo je suis un pod $HOSTNAME'
sh 'echo Version = $MaVar'
sh 'echo Environnement par défaut = $ENV_DEF'
sh "echo Environnement choisi = ${params.Environnement}"
}
}
}
}