forked from teja302/intellipaat-jan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjenkins-links-commands
74 lines (51 loc) · 2.03 KB
/
jenkins-links-commands
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
Links:
https://www.jenkins.io/doc/book/installing/linux/
https://maven.apache.org/
https://mvnrepository.com/
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Maven Project Repo: https://github.com/raushan8586/MyLab.git
https://www.baeldung.com/tomcat-deploy-war
Jenkinsfile --> Pipeline as Code
https://www.jenkins.io/doc/book/pipeline/
Jenkinsfile --> https://github.com/raushan8586/MyLab
https://www.jenkins.io/doc/book/pipeline/syntax/
https://github.com/eldada/jenkins-pipeline-kubernetes
https://github.com/hakdogan/jenkins-pipeline/blob/master/Jenkinsfile
https://gist.github.com/gazoakley/87dcc16d28fd05acda4ba0a4be5ac387
GitHub Actions
https://docs.github.com/en/actions
https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions#overview
https://github.com/actions
Commands:
root@ip-172-31-3-129:~# history
1 apt update -y
2 clear
3 java -version
4 apt install openjdk-11-jre -y
5 java -version
6 clear
7 curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
8 echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian-stable binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
9 apt update -y
10 apt install jenkins -y
11 lsof -i -P -n | grep LISTEN
12 cat /var/lib/jenkins/secrets/initialAdminPassword
13 history
apt update -y
2 mvn -version
3 apt install maven -y
4 mvn -version
5 cd /var/lib/jenkins/workspace/maven-job/target/
6 ls -l
18 visudo
Add this line --> jenkins ALL=(ALL) NOPASSWD: ALL
19 service jenkins status
20 service jenkins stop
21 service jenkins start
22 service jenkins status
23 docker ps
24 history
sudo docker rm -f $(sudo docker ps -a -q)
sudo docker build /var/lib/jenkins/workspace/BuildContainerizedApp/ -t httpd1
sudo docker run -itd -p 82:80 httpd1
https://github.com/raushan8586/pipeline1.git