GitHub Actions || GitHub Actions Vs Jenkins || How to create CI/CD Pipeline using GitHub Actions

แชร์
ฝัง
  • เผยแพร่เมื่อ 14 ต.ค. 2024
  • In this video we discussed about what is github actions and components of github actions and difference between github actions and jenkins and created ci/cd pipeline using docker .
    what are workflows ?
    1.The workflow is an automated procedure that you add to your repository
    2.they are made up of one or more jobs and can be scheduled or trigger by an event.
    3.it can be used to build,test,package,release or deploy a project on github.
    4.workflows can be created inside the .github/workflows directory be adding a.yml workflow file.
    example add .github/workflows/ci.yml to your project
    what are events?
    1.An event is a specific activity that triggers a workflow . for example, activity can originate from GitHub when someone pushes a commit to a repository or when an issue or pull request is created.
    2.you can also use the repository dispatch webhook to trigger a workflow when an external event occurs.
    what are jobs?
    1.A job is a set of steps that execute on the same runner.
    2.By default, a workflow with multiple jobs in parallel. You can also configure a workflow to run jobs sequentially.
    3.for example a workflow can have two sequential jobs that build and test code, where the test job is dependent on the status of the build job. If the build job fails. the test will not run.
    what are steps?
    1.step is an individual task that can run commands in a job.
    2.A step can be either an action or shell command.
    3.Each step in a job executes on the same runner allowing the actions in that job to share data with each other.
    What are Actions?
    1. Actions are standalone commands that are combined into steps to create a job.
    2.Action are the smallest portable building block of a workflow.
    3.You can create your own actions or use actions created by the GitHub community, to use an action in workflow , you must include it as a step.
    What are Runners?
    1.A runner is a server that has the GitHub actions runner application installed.
    2.you can use a runner hosted by GitHub or you can host your own.
    3.A runner listens for available jobs, runs one job at a time and reports the progress , logs and results back to GitHub
    Types of Runners
    1.Github-hosted runners are based on ubuntu Linux, Microsoft windows, and macOS and each job in a workflow run in a fresh virtual environment(GitHub-hosted runner)
    2.if you need a different operation system or require a specific hardware configuration you can host your own runners.(self-hosted runner)
    Supported runners and hardware resources
    Hardware specification for windows and Linux virtual machines:
    2-core CPU
    7GB of RAM Memory
    14 GB of SSD disk space
    Hardware specification for macOS virtual machines
    3-core CPU
    14GB of RAM memory
    Syntax and Structure
    GitHub Actions: Uses YAML syntax to define workflows, jobs, and steps.
    Jenkins Pipeline: Uses Groovy DSL (Domain Specific Language) to define pipelines, stages, and steps.
    Agent/Runner
    GitHub Actions: Uses runs-on to specify the operating system for the job runner (e.g., ubuntu-latest).
    Jenkins Pipeline: Utilizes agent to specify where the pipeline will execute (e.g., any for any available agent).
    Triggers
    GitHub Actions: Defines triggers using the on keyword (e.g., push events on the master branch).
    Jenkins Pipeline: Utilizes the triggers block to define events that trigger the pipeline (e.g., githubPush() for GitHub push events).
    Steps
    Both GitHub Actions and Jenkins Pipeline use steps to define tasks within a job or stage.
    GitHub Actions: Each step is defined under the steps keyword with a name and a run command.
    Jenkins Pipeline: Steps are defined within stages blocks, and each stage can have multiple steps.
    Integration
    GitHub Actions: Integrated directly into GitHub repositories, making it easy to set up CI/CD workflows for projects hosted on GitHub.
    Jenkins: Requires a separate Jenkins server installation and configuration, providing more flexibility but requiring additional setup and maintenance.

ความคิดเห็น • 3

  • @hangoutbuddy
    @hangoutbuddy 5 หลายเดือนก่อน +1

    Nice session ❤

    • @bcreddydevops7289
      @bcreddydevops7289  5 หลายเดือนก่อน

      Thank you

    • @hangoutbuddy
      @hangoutbuddy 5 หลายเดือนก่อน

      @@bcreddydevops7289 can you please upload more videos on GitHub actions? Its widely asked tech nowadays and resources are very few.