Posts

Showing posts from July, 2024

Jenkins

In How many ways can we launch an agent in Jenkins? Launch agent by connecting it to master. Agent Connects to master Launch agent via SSH Controller initiates the connection to the SSH. How do we login into AWS? How do we pass and login AWS in Jenkins pipelines or Jenkins file? We can use assume role and get credentials. We can use AWS plug-in to configure cloud. In the cloud, we can provide our AWS access key or secret key. We can add our EC2 End point, region, et cetera Now in Jenkins credential provider, we can give our username and provide key credentials. This will give us a credential ID. We can use this credential ID in Jenkins pipelines. Can we write git clone in pipeline? No, we can use checkout instead. What is the difference between scripted and declarative pipeline? Declarative pipelines uses declarative model and scripted uses imperative model.Declarative breaks the stages into multiple steps.Scripted Does not require this. Scripted pipelines permit developer to inject a ...

GIT

  What is the difference between git pull and git fetch? Git fetch command tell our local gate to Vihar, the latest meta data information from original repository.(There is no file transferring. It is just like checking to see if there are any changes available.) Git pull is used To download latest changes from central repository To local repository.(File transfer happens here). I have same history and want to commit in four branches. What should I use? Git worktree helps to create parallel repository so that we can work on them in parallel.

CICD

  How the process of pushing application to container happens in CICD pipeline? Push is to github. Github is hooked to Jenkins, which listens to an SSH. Whenever code is pushed, it triggers a build, and this artefact goes to Kubernetes cluster. The cluster then take it as an image and runs it on the container in some port.