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
# Ubuntu 16.10 | |
# Laravel 5.4 | |
# Step 1 | |
adduser webdev | |
# Step 2 | |
usermod -aG sudo webdev | |
# Step 3 generate an SSH key pair on local machine |
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
# Install Jenkins | |
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt-get update | |
sudo apt-get install -y jenkins ant | |
# Configure a reverse proxy on Nginx to secure Jenkins | |
server { | |
listen 443 ssl; | |
listen [::]:443; |
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
node { | |
stage('download') { | |
git branch: 'master', url: 'github/url/to/your/project' | |
} | |
stage('install') { | |
sh 'composer install' | |
} | |
stage('init') { | |
sh 'cp .env.example .env' | |
sh 'php artisan key:generate' |