Skip to content

Instantly share code, notes, and snippets.

@ponych
Created May 2, 2018 12:57
Show Gist options
  • Save ponych/cf8b4f0c757cc7188f379b67abdbef68 to your computer and use it in GitHub Desktop.
Save ponych/cf8b4f0c757cc7188f379b67abdbef68 to your computer and use it in GitHub Desktop.
Jenkinsfile
pipeline {
agent any
options {
checkoutToSubdirectory 'src'
}
environment {
HOST_PROD = "[{\"host\":\"app35\",\"port\":58422,\"path\":\"/home/plus/lumen2\"}]"
HOST_TEST = "[{\"host\":\"dev\",\"port\":22,\"path\":\"/home/plus/lumen2\"}]"
}
stages {
stage('git-checkout') {
steps {
dir('src') {
sh '/usr/local/bin/proxychains4 composer install -vv'
}
}
}
stage('Test') {
steps {
sh "ls -al"
sh 'cd src ;./vendor/bin/phpunit --log-junit=storage/logs/unitreport'
echo 'Testing'
}
}
stage('Deploy') {
steps {
sh "/var/lib/jenkins/shells/deploy.php"
echo 'Deployed'
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment