Jenkins Freestyle Project (02) : Day - 40

ยท

3 min read

Table of contents

What is CI/CD?

Continuous Integration:

Continuous integration is a procedure to integrate all the code changes done by several developers in one project. A code is repeatedly tested after a commit to guarantee the code is error and bug-free.

Continuous Deployment:

Continuous Deployment aims at continuously releasing the code changes into the production environment.

Continuous deployment | Atlassian

Continuous Delivery:

Continuous Delivery is a software engineering practice where the code changes are prepared to be released.

Understanding Continuous Delivery | TeamCity CI/CD Guide | JetBrains

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.

What is Freestyle Projects ?? ๐Ÿค”

A freestyle project in Jenkins is a type of project that allows you to build, test, and deploy software using a variety of different options and configurations. Here are a few tasks that you could complete when working with a freestyle project in Jenkins:

Task-01

  • create an agent for your app. ( which you deployed from docker in the earlier task)

    1. Go to Manage Jenkins and click on set up agent

    2. Give agen node name and select a permanent option and click on 'create'.

    3. Provide remote root directory location.

    4. Give labels to this node and select 'Use WebSocket'.

    5. Click on save to create an agent.

    6. todo-app-dev Agent created.

  • Create a new Jenkins freestyle project for your app.

    1. Go to Dashboard and create a new item as django-todo-app-delivery as Freestyle project and click on 'OK'.

    2. Provide description.

    3. Provide GitHub project URL where your source code is available.

    4. Provide repository URL.

    5. Specify branch.

    6. In the "Build" section of the project, add a build step to run the "docker build" command to build the image for the container.

    7. Save it and click on Build Now.

    8. Access the app through the URL.

Task-02

  • Create Jenkins project to run the "docker-compose up -d" command to start the multiple containers defined in the compose file (Hint- use day-19 Application & Database docker-compose file)

    -To complete this task I just followed the same steps with the two-tier flask app docker file.

  • Set up a cleanup step in the Jenkins project to run the "docker-compose down" command to stop and remove the containers defined in the compose file.

Thank you for your reading. Happy Learning!!!๐Ÿ˜Š

ย