004-Jenkins-Create FreeStyle Job
0. Environment is CentOS7yum update
0.1. wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
0.2. rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
0.3. yum –y install jenkins
0.4. yum install java-1.7.0-openjdk(or download from java website manually)
0.5. service jenkins start/stop/restart or systemctl start/stop/restart jenkins
0.6. chkconfig jenkins on
0.7. useradd jenkins; passwd jenkins; su jenkins; ssh-keygen -t rsa -C “XXX”
0.8. copy the content in the> 1. Create a Freestyle project
1.1Enter Jenkins -> New Item, then input the item name and select “Freestyle project”, go to next step;
1.2Input the Project Name
https://images2015.cnblogs.com/blog/1121509/201703/1121509-20170309112333547-778627351.jpg
Source Code Management, we select “Git”
https://images2015.cnblogs.com/blog/1121509/201703/1121509-20170309112346391-925752516.jpg
The private key is Enter directly:
https://images2015.cnblogs.com/blog/1121509/201703/1121509-20170309112401781-435649614.jpg
Another way to set the credential.
1.3Go to “Build”
Execute shell
Command:
https://images2015.cnblogs.com/blog/1121509/201703/1121509-20170309112413563-1172751046.jpg
1.4 Save the job, then you can go the left menu and click "Build Now".
页:
[1]