Last active
September 7, 2016 14:12
-
-
Save patrickbrandt/1271869845148c2e5d58 to your computer and use it in GitHub Desktop.
Setup a Jenkins server for front-end builds and AWS Elastic Beanstalk deployments
This file contains hidden or 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
#!/bin/bash | |
# This script must be run with root-level permissions | |
# Install Compass | |
yum install -y gcc g++ make automake autoconf ruby-devel | |
gem update --system | |
gem install compass | |
# Install Node | |
curl -sL https://rpm.nodesource.com/setup | bash - | |
yum install -y nodejs | |
# Install client-side build utilities | |
npm install -g grunt-cli | |
npm install -g bower | |
npm install -g gulp | |
# Install git | |
yum -y install git | |
# Install Jenkins and start it up | |
yum -y install java-1.7.0-openjdk-devel | |
# curl -o /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo | |
curl -OL http://pkg.jenkins-ci.org/redhat-stable/jenkins-1.651.3-1.1.noarch.rpm | |
rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key | |
# yum -y install jenkins | |
rpm -Uvh jenkins-1.651.3-1.1.noarch.rpm | |
service jenkins start | |
chkconfig jenkins on | |
# Install jenkins plugins | |
# NOTE: this curl call may fail on first attempt - if you retry, it will work | |
curl -OL http://localhost:8080/jnlpJars/jenkins-cli.jar | |
java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin git | |
java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin managed-scripts | |
java -jar jenkins-cli.jar -s http://localhost:8080/ install-plugin awseb-deployment-plugin | |
java -jar jenkins-cli.jar -s http://localhost:8080/ restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment