Day 23: Jenkins Freestyle Project for DevOps Engineers.
Ajay Kadam
Learning Devops | Python | AWS | Linux | Git | GitHub | Docker | Jenkins | kubernetes
What Is a Build Job?
A Jenkins build job contains the configuration for automating a specific task or step in the application building process. These tasks include gathering dependencies, compiling, archiving, or transforming code, and testing and deploying code in different environments.
Jenkins supports several types of build jobs, such as freestyle projects, pipelines, multi-configuration projects, folders, multibranch pipelines, and organization folders.
To implement Continuous Deployment in Jenkins you need to set various pipelines that will consist of Several Stages which include the following:
A) Build
B) Stage
C) Deploy (Deployment)
D) Monitor
TASK 01:
Create Freestyle project in jenkins.
Step 1:
Login to Jenkins and create freestyle project.
Step 2:
Select Git Project and use below Repo.
Step 3:
In Build Step use docker build and docker run.
docker build . -t flask-app:latest
docker run -d -p 5000:5000 flask-app:latest
TASK 2 :
Create Freestyle project for same app as above but this time we will use docker compose.
Follow Same steps but in step 3 there is little changes.
Use below line instead of above docker build and run in build step(Execute Shell)
docker-compose down && docker-compose up
Founder @ Bridge2IT +32 471 26 11 22 | Business Analyst @ Carrefour Finance
8 个月Your expertise in DevOps shines through your post. Well done! ????