add jenkinsfile and reorganised docker-compose.yml
Some checks failed
abc-api/abcParser/master This commit looks good
abc-api/abcParser/pipeline/head There was a failure building this commit

This commit is contained in:
2020-03-22 10:19:27 -04:00
parent 195ce491a1
commit a530e8fd78
2 changed files with 43 additions and 7 deletions

33
Jenkinsfile vendored Normal file
View 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"
}
}
}
}
}

View File

@@ -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: