-
Notifications
You must be signed in to change notification settings - Fork 0
Jenkins
ILLYAKO edited this page Dec 11, 2022
·
22 revisions
https://www.youtube.com/watch?v=pMO26j2OUME&list=PLy7NrYWoggjw_LIiDK1LXdNN82uYuuuiC
jenkins-docker-app
- Jenkins Container Setup
- Create Multibranch Pipeline with Git Repo
- Types of Credentials
- Jenkinsfile
Code -> Commit-> Git Repo-> Trigger build -> Jenkinsfile:test, build, deploy
1.1. Find a Jenkins image in dockerhub
The image 'jenkins/jenkins' should be used.
- Expose port 8080 -- By default runs on that port
- Expose port 50000 -- Master/Slaver Communication
- Run in detached mode -- run container in the background
- Bind named volume -- persist data of Jenkins, bind host directory and container directory
- image version -- latest (jenkins/jenkins:lts)
.
docker run -p 8080:8080 -p 50000:50000 -d -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts
docker ps
docker logs your_ContainerID
Jenkins initial setup is required. An admin user has been created and a password generated.
Please use the following password to proceed to installation:
3adc1a26a8fd4128a816ca8ba01da498
This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
Ilya 1234 Illya K ilhaifa@yandex.ru Jenkins URL http://localhost:8080/ Save and Finish
- Freestyle: simple, single tasks e.g. run tests
- Pipeline: whole delivery cycle e.g. test|build|... for a single branch
- Multibranch Pipeline : like pipeline for multiple branches