-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
39 lines (38 loc) · 1.18 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
pipeline {
agent any
environment {
branch = 'master'
scmUrl = 'https://github.com/Airl3uZ/demo-php-ci.git'
serverPort = '8080'
Image = 'webdevops/php-nginx'
}
stages {
stage('checkout code') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/Airl3uZ/demo-php-ci.git']]])
}
}
stage('build docker') {
steps {
script {
// docker.image('webdevops:php-nginx:latest').withRuns('-d=true -p 8888:80'){
docker.image('webdevops/php-nginx:latest').inside("-v app:/app") {
sh 'cd /app && pwd && composer update'
}
}
// }
}
}
stage('Test') {
steps {
echo 'Testing..'
// sh "./vendor/bin/phpunit"
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}