Jenkins on AWS
Posted on October 11, 2017 in Tutorial • 1 min read
Use jenkins to deploy node.js server on AWS EC2
Begin
- create instance
- ssh to instance
Install jenkins
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
echo deb http://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list
sudo apt-get update
sudo apt-get install jenkins
sudo systemctl start jenkins
Login jenkins from local
In the AWS terminal window, we'll use the cat command to display the password:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
setting
build -> execute shell