Skip to content

Instantly share code, notes, and snippets.

@CarterZhou
CarterZhou / pipeline-of-installing-and-testing-laravel-application
Last active March 28, 2024 17:05
This is a sample script of installing and testing a Laravel application using Jenkins pipeline
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'
@CarterZhou
CarterZhou / jenkins-installation-and-setup
Created May 26, 2017 07:21
Script to install and secure Jenkins
# 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;
@CarterZhou
CarterZhou / laravel-on-fresh-ubuntu
Last active January 5, 2018 23:12
Laravel on fresh Ubuntu
# 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