add jenkinsfile and reorganised docker-compose.yml
This commit is contained in:
33
Jenkinsfile
vendored
Normal file
33
Jenkinsfile
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
pipeline {
|
||||
environment {
|
||||
WORKDIR = './'
|
||||
DOCKER_HOST = 'dkhost:2376'
|
||||
}
|
||||
|
||||
agent { label 'docker' }
|
||||
options {
|
||||
buildDiscarder(logRotator(numToKeepStr: '2'))
|
||||
}
|
||||
triggers {
|
||||
cron('@weekly')
|
||||
}
|
||||
|
||||
stages {
|
||||
stage('prepare') {
|
||||
steps {
|
||||
checkout scm
|
||||
sh 'docker-compose run --rm composer install'
|
||||
sh 'ls'
|
||||
}
|
||||
}
|
||||
|
||||
stage('test') {
|
||||
steps {
|
||||
dir(WORKDIR) {
|
||||
//sh "DOCKER_HOST=${DOCKER_HOST} docker-compose -f docker-compose.prod.yml pull"
|
||||
sh "docker-compose run --rm tests"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user