Ajouter Jenkinsfile
This commit is contained in:
commit
70dcc7228c
1 file changed
+37
Vendored
+37
@@ -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}"
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user