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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,17 +1,20 @@
|
|||||||
version: '2'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
|
|
||||||
parser:
|
tests:
|
||||||
image: abc-api/api:latest
|
image: dkregistry.xai-corp.net:5000/xaicorp/php:7.2-dev
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/www
|
- .:/var/www
|
||||||
- .:/opt/project
|
- .:/opt/project
|
||||||
|
command:
|
||||||
|
- vendor/bin/codecept
|
||||||
|
- run
|
||||||
|
|
||||||
parser-composer:
|
composer:
|
||||||
image: composer/composer:alpine
|
image: dkregistry.xai-corp.net:5000/xaicorp/composer:7.2
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/opt/project
|
||||||
- ~/.ssh:/root/.ssh
|
# - ~/.ssh:/root/.ssh
|
||||||
entrypoint:
|
entrypoint:
|
||||||
- composer
|
- composer
|
||||||
command:
|
command:
|
||||||
|
|||||||
Reference in New Issue
Block a user