Skip to content

Instantly share code, notes, and snippets.

@gusanthiago
Created June 23, 2018 14:12
Show Gist options
  • Save gusanthiago/4bd534357e51d031e2429d637ead6c0d to your computer and use it in GitHub Desktop.
Save gusanthiago/4bd534357e51d031e2429d637ead6c0d to your computer and use it in GitHub Desktop.
node('php') {
stage('Check Java version') {
sh 'java -version'
}
stage('Current time') {
sh 'date'
}
}
node('php') {
stage('Checkout') {
git 'https://github.com/cursojenkins/laravel.git'
}
stage('Prepare') {
sh 'cp .env.example .env'
}
stage('Build') {
sh 'composer install --prefer-dist --ignore-platform-reqs --no-scripts'
}
stage('Docker Build') {
sh "docker build -t gusanthiago/laravel ."
}
stage('Docker Ship') {
sh "docker push gusanthiago/laravel"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment