30 lines
811 B
Groovy
30 lines
811 B
Groovy
pipeline {
|
|
agent any
|
|
parameters {
|
|
choice(
|
|
name: 'IMAGE',
|
|
choices: ['ansible', 'apidocjs', 'composer', 'mondrian', 'php'],
|
|
description: 'What image would you like to build?'
|
|
)
|
|
}
|
|
options {
|
|
disableConcurrentBuilds()
|
|
buildDiscarder(logRotator(numToKeepStr: '10'))
|
|
}
|
|
stages {
|
|
stage('Build Image') {
|
|
steps {
|
|
//git credentialsId: 'f1f58215-c789-44a2-9b72-50e4425cb061', url: 'ssh://git@git.xai-corp.net:10022/xai-corp.net/provisioning.git'
|
|
checkout scm
|
|
sh 'ls'
|
|
|
|
dir("dockerfiles/tasks/$params.IMAGE") {
|
|
sh 'chmod +x build.sh && ls -l'
|
|
|
|
sh './build.sh'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|