Skip to content

Latest commit

 

History

History
37 lines (33 loc) · 879 Bytes

File metadata and controls

37 lines (33 loc) · 879 Bytes

Docker Compose Dockerfile

Container which can be used within Jenkinsfiles

Container includes make and git

Example:

pipeline {
    agent {
        docker { image 'inogo/docker-compose:2.15.1' }
    }
    stages {
        stage('Build') {
            steps {
                sh 'make build'
                sh 'docker-compose -f docker-compose.test.yml up -d'
            }
        }
        
        stage('Test') {
            parallel {
                stage('backend') {
                    steps {
                        sh 'docker-compose -f docker-compose.test.yml exec -T backend test'
                    }
                }
                stage('frontend') {
                    steps {
                        sh 'docker-compose -f docker-compose.test.yml exec -T frontend test'
                    }
                }
            }
        }
    }
}