-
Notifications
You must be signed in to change notification settings - Fork 85
/
jenkins
67 lines (45 loc) · 1.95 KB
/
jenkins
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
apt update -y
2 clear
3 sudo apt install openjdk-11-jre -y
4 java -version
23 curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee /usr/share/keyrings/jenkins-keyring.asc > /dev/null
24 echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] https://pkg.jenkins.io/debian binary/ | sudo tee /etc/apt/sources.list.d/jenkins.list > /dev/null
25 sudo apt-get update
26 sudo apt-get install jenkins
27 systemctl status jenkins
28 lsof -i -P -n | grep LISTEN
29 cat /var/lib/jenkins/secrets/initialAdminPassword
Dockerfile
https://github.com/raushan8586/pipeline1.git
Docker-Job
sudo docker rm -f $(sudo docker ps -a -q)
sudo docker build /var/lib/jenkins/workspace/Build-Website-Job/ -t httpd1
sudo docker run -itd -p 82:80 httpd1
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
visudo
Add this line --> jenkins ALL=(ALL) NOPASSWD: ALL
Maven Build Lifecycle
----------------------
https://maven.apache.org/index.html
https://mvnrepository.com/artifact/org.testng/testng/7.7.1
Build Lifecycle
https://maven.apache.org/guides/introduction/introduction-to-the-lifecycle.html
Repo --> https://github.com/raushan8586/MyLab
Tomcat
VM --> https://www.baeldung.com/tomcat-deploy-war
Container --> https://www.baeldung.com/docker-deploy-java-war
Jenkinsfile --> Pipeline as Code
------------
https://www.jenkins.io/doc/book/pipeline/
https://www.jenkins.io/doc/book/pipeline/syntax/
https://github.com/raushan8586/MyLab
More Jenkinsfile
-----------------
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://www.youtube.com/watch?v=R8_veQiYBjI
https://www.youtube.com/watch?v=TLB5MY9BBa4