Created
May 2, 2018 12:57
-
-
Save ponych/cf8b4f0c757cc7188f379b67abdbef68 to your computer and use it in GitHub Desktop.
Jenkinsfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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