From e7d3dd3d04eb5e53ffa872f5af8f8b06b4fdeff5 Mon Sep 17 00:00:00 2001 From: Syed Sadat Ali Date: Sun, 31 Mar 2024 00:47:43 +0530 Subject: [PATCH 1/6] github actions task added --- Teaching/Github-Actions/Github-Actions.md | 46 +++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Teaching/Github-Actions/Github-Actions.md diff --git a/Teaching/Github-Actions/Github-Actions.md b/Teaching/Github-Actions/Github-Actions.md new file mode 100644 index 0000000..26216b1 --- /dev/null +++ b/Teaching/Github-Actions/Github-Actions.md @@ -0,0 +1,46 @@ +# New Git Concepts + +## Story + +In software development, it's essential to maintain a structured workflow to manage changes efficiently and ensure code quality. Git workflows like GitFlow and GitHub Flow provide guidelines for managing branching strategies and integrating changes smoothly. + +## Materials + +https://www.atlassian.com/git/tutorials/comparing-workflows +https://www.redhat.com/sysadmin/git-hooks +https://docs.github.com/en/actions/using-workflows/about-workflows + +## What you need to do + +* Choose a Git workflow model (e.g., GitFlow, GitHub Flow, or your custom workflow). +* Set up a new project repository following the chosen workflow model. + * Create a new project repository on a GitHub. + * Define the repository structure, including main, feature, and release branches. + * Establish guidelines for branch naming conventions and versioning schemes. +* Implement a feature by creating a new feature branch, making changes, and merging the branch back into the main branch. + * Create feature branches for new developments and bug fixes. + * Demonstrate the process of making changes, staging commits, and merging branches. + * Highlight best practices for resolving merge conflicts and ensuring branch consistency. +* Configure a continuous integration (CI) system (e.g., GitHub Actions) to automate testing and code quality checks. + * Integrate CI tools such as GitHub Actions into the project workflow. + * Define CI pipelines to automate testing, code analysis, and deployment processes. + * Customize CI configurations to suit project requirements and ensure seamless integration with Git branches. + +* Document your workflow process, including branching strategies, pull request guidelines, and CI configuration. + +* Bonus Task 1: Implement automatic deployment of the project to a staging environment after successful CI checks. +* Bonus Task 2: Experiment with Git hooks to enforce coding standards and prevent committing code that doesn't meet quality criteria. + * Dive deeper into Git hooks by experimenting with post-receive hooks for server-side actions. + * Explore advanced hook scripts to enforce stricter code quality criteria and prevent committing substandard code. + +**Please remember to keep the presentation short and concise. Long presentation bores the audience and you will also get tired in presenting. It has also been observed that images, quotes, interactive programming sessions tend to keep the audience interested in the content. (Recommended: Keep he presentation with 20 slides). Interview should be also prepared for questions regarding the topics being presented by him/her.** + +## Tech Stack + +Git, CI/CD tools (e.g., GitHub Actions). + +## Learning from the task + +Understand Git workflows and their applications in real-world projects. +Learn about integrating Git with CI/CD pipelines to automate testing and deployment processes. +Gain experience in setting up and managing complex development workflows. From 29a71dc84334ce85e2c7a644601a1c4cac12bbc2 Mon Sep 17 00:00:00 2001 From: Syed Sadat Ali <119589393+Sadat3332@users.noreply.github.com> Date: Sun, 31 Mar 2024 00:52:06 +0530 Subject: [PATCH 2/6] tweaks Github-Actions.md --- Teaching/Github-Actions/Github-Actions.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Teaching/Github-Actions/Github-Actions.md b/Teaching/Github-Actions/Github-Actions.md index 26216b1..99351dd 100644 --- a/Teaching/Github-Actions/Github-Actions.md +++ b/Teaching/Github-Actions/Github-Actions.md @@ -1,4 +1,4 @@ -# New Git Concepts +# Github Actions ## Story @@ -6,15 +6,16 @@ In software development, it's essential to maintain a structured workflow to man ## Materials -https://www.atlassian.com/git/tutorials/comparing-workflows -https://www.redhat.com/sysadmin/git-hooks -https://docs.github.com/en/actions/using-workflows/about-workflows +* https://www.atlassian.com/git/tutorials/comparing-workflows, +* https://www.redhat.com/sysadmin/git-hooks, +* https://docs.github.com/en/actions/using-workflows/about-workflows +* https://codefresh.io/learn/github-actions/github-actions-tutorial-and-examples/ ## What you need to do * Choose a Git workflow model (e.g., GitFlow, GitHub Flow, or your custom workflow). * Set up a new project repository following the chosen workflow model. - * Create a new project repository on a GitHub. + * Create a new project repository on GitHub. * Define the repository structure, including main, feature, and release branches. * Establish guidelines for branch naming conventions and versioning schemes. * Implement a feature by creating a new feature branch, making changes, and merging the branch back into the main branch. @@ -33,7 +34,7 @@ https://docs.github.com/en/actions/using-workflows/about-workflows * Dive deeper into Git hooks by experimenting with post-receive hooks for server-side actions. * Explore advanced hook scripts to enforce stricter code quality criteria and prevent committing substandard code. -**Please remember to keep the presentation short and concise. Long presentation bores the audience and you will also get tired in presenting. It has also been observed that images, quotes, interactive programming sessions tend to keep the audience interested in the content. (Recommended: Keep he presentation with 20 slides). Interview should be also prepared for questions regarding the topics being presented by him/her.** +**Please remember to keep the presentation short and concise. Long presentation bores the audience and you will also get tired while presenting. It has also been observed that images, quotes, interactive programming sessions tend to keep the audience interested in the content. (Recommended: Keep the presentation within 20 slides). Interview should be also prepared for questions regarding the topics being presented by him/her.** ## Tech Stack From dcc59d57c00947c1ec815d406f54960f3170a1ae Mon Sep 17 00:00:00 2001 From: Syed Sadat Ali Date: Wed, 3 Apr 2024 16:10:12 +0530 Subject: [PATCH 3/6] CI CD pipeline --- ...kflows-with-automated-CI-CD-Integration.md | 66 +++++++++++++++++++ Teaching/Github-Actions/Github-Actions.md | 47 ------------- 2 files changed, 66 insertions(+), 47 deletions(-) create mode 100644 Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md delete mode 100644 Teaching/Github-Actions/Github-Actions.md diff --git a/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md new file mode 100644 index 0000000..39686af --- /dev/null +++ b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md @@ -0,0 +1,66 @@ +# Git Workflows with Automated CI/CD Integration + +## Story + +In software development, it's essential to maintain a structured workflow to manage changes efficiently and ensure code quality. Git workflows like GitFlow,GitHub Flow,Forking Workflow and Centralised workflow provide guidelines for managing branching strategies and integrating changes smoothly. + +CI/CD practices aim to automate and streamline the software development lifecycle, from code integration and testing to deployment and delivery. + +* Continuous Integration (CI): Involves automatically integrating code changes into a shared repository multiple times a day. CI pipelines typically include automated tests to ensure code quality and detect issues early in the development process. + +* Continuous Delivery (CD): Focuses on automating the delivery of code changes to production-like environments, enabling teams to release software updates at any time. CD pipelines involve automated deployment and validation steps, ensuring that code changes are production-ready. + +* Continuous Deployment (CD): Takes automation a step further by automatically deploying every code change that passes through the CI/CD pipeline directly to production environments. This approach enables rapid delivery of features and fixes while maintaining a high level of confidence in the stability and reliability of the software. + +GitHub Actions is a continuous integration and continuous delivery (CI/CD) platform that allows you to automate your build, test, and deployment pipeline. You can create workflows that build and test every pull request to your repository, or deploy merged pull requests to production. +In GitHub Actions a workflow is a series of actions initiated once a triggering event occurs. For example, the triggering event can be some commit pushed to a GitHub repository, the creation of a pull request, or another workflow completed successfully. +The workflow is divided into jobs, and each job performs a set of steps. Each step runs one or more commands and can also call self-contained units of commands called actions. Each step runs on computational resources called runners, and the default settings can specify it to be Windows or Linux. + +## Materials + +https://www.atlassian.com/git/tutorials/comparing-workflows +https://www.redhat.com/sysadmin/git-hooks +https://docs.github.com/en/actions/using-workflows/about-workflows +https://codefresh.io/learn/github-actions/github-actions-tutorial-and-examples/ + +## What you need to do + +* Create a presentation explaining all of the concepts mentioned and how you implemented them, make sure the explanations are comprehensive. + +* Choose a Git workflow model (e.g., GitFlow, GitHub Flow, Forking Workflow or your custom workflow). +* Set up a new project repository following the chosen workflow model. + * Create a new project repository, it can be a Node.js project or you can create your own project on GitHub. + * Define the repository structure + * Establish branch naming conventions (e.g., main,develop,feature branches,hotfix branches, release branches) + * Establish guidelines for branch naming conventions and versioning schemes. +* Implement a feature by creating a new feature branch, making changes, and merging the branch back into the main branch. + * Create feature branches for new developments and bug fixes. + * Demonstrate the process of making changes, staging commits, and merging branches. + * Highlight best practices for resolving merge conflicts and ensuring branch consistency. +* Configure a continuous integration (CI) system (e.g., GitHub Actions, Jenkins, Travis CI) to automate testing and code quality checks. + * Integrate CI tools such as GitHub Actions into the project workflow. + * Define CI pipelines to automate testing, code analysis, and deployment processes. + * You should write your own pipeline configuration +* Test your CI/CD pipeline + * Implement a feature from start to deployment testing the pipeline with various errors during the process (Incorrect syntax, code styling using linters) + * Push these changes to feature branches. + * Ensure the pipeline handles various scenarios like feature releases and syntax errors appropriately. + +* Document your workflow process, including branching strategies, pull request guidelines, and CI configuration. + +* Bonus Task 1: Implement automatic deployment of the project to a staging environment after successful CI checks. +* Bonus Task 2: Experiment with Git hooks to enforce coding standards and prevent committing code that doesn't meet quality criteria. + * Dive deeper into Git hooks by experimenting with post-receive hooks for server-side actions. + * Explore advanced hook scripts to enforce stricter code quality criteria and prevent committing substandard code. + +**Please remember to keep the presentation short and concise. Long presentation bores the audience and you will also get tired in presenting. It has also been observed that images, quotes, interactive programming sessions tend to keep the audience interested in the content. (Recommended: Keep he presentation with 20 slides). Interview should be also prepared for questions regarding the topics being presented by him/her.** + +## Tech Stack + +Git, CI/CD tools (e.g., GitHub Actions, Jenkins). + +## Learning from the task + +Understand Git workflows and their applications in real-world projects. +Learn about integrating Git with CI/CD pipelines to automate testing and deployment processes. +Gain experience in setting up and managing complex development workflows. diff --git a/Teaching/Github-Actions/Github-Actions.md b/Teaching/Github-Actions/Github-Actions.md deleted file mode 100644 index 99351dd..0000000 --- a/Teaching/Github-Actions/Github-Actions.md +++ /dev/null @@ -1,47 +0,0 @@ -# Github Actions - -## Story - -In software development, it's essential to maintain a structured workflow to manage changes efficiently and ensure code quality. Git workflows like GitFlow and GitHub Flow provide guidelines for managing branching strategies and integrating changes smoothly. - -## Materials - -* https://www.atlassian.com/git/tutorials/comparing-workflows, -* https://www.redhat.com/sysadmin/git-hooks, -* https://docs.github.com/en/actions/using-workflows/about-workflows -* https://codefresh.io/learn/github-actions/github-actions-tutorial-and-examples/ - -## What you need to do - -* Choose a Git workflow model (e.g., GitFlow, GitHub Flow, or your custom workflow). -* Set up a new project repository following the chosen workflow model. - * Create a new project repository on GitHub. - * Define the repository structure, including main, feature, and release branches. - * Establish guidelines for branch naming conventions and versioning schemes. -* Implement a feature by creating a new feature branch, making changes, and merging the branch back into the main branch. - * Create feature branches for new developments and bug fixes. - * Demonstrate the process of making changes, staging commits, and merging branches. - * Highlight best practices for resolving merge conflicts and ensuring branch consistency. -* Configure a continuous integration (CI) system (e.g., GitHub Actions) to automate testing and code quality checks. - * Integrate CI tools such as GitHub Actions into the project workflow. - * Define CI pipelines to automate testing, code analysis, and deployment processes. - * Customize CI configurations to suit project requirements and ensure seamless integration with Git branches. - -* Document your workflow process, including branching strategies, pull request guidelines, and CI configuration. - -* Bonus Task 1: Implement automatic deployment of the project to a staging environment after successful CI checks. -* Bonus Task 2: Experiment with Git hooks to enforce coding standards and prevent committing code that doesn't meet quality criteria. - * Dive deeper into Git hooks by experimenting with post-receive hooks for server-side actions. - * Explore advanced hook scripts to enforce stricter code quality criteria and prevent committing substandard code. - -**Please remember to keep the presentation short and concise. Long presentation bores the audience and you will also get tired while presenting. It has also been observed that images, quotes, interactive programming sessions tend to keep the audience interested in the content. (Recommended: Keep the presentation within 20 slides). Interview should be also prepared for questions regarding the topics being presented by him/her.** - -## Tech Stack - -Git, CI/CD tools (e.g., GitHub Actions). - -## Learning from the task - -Understand Git workflows and their applications in real-world projects. -Learn about integrating Git with CI/CD pipelines to automate testing and deployment processes. -Gain experience in setting up and managing complex development workflows. From af868d85bece137ed324c1e9115cf812967bb0ef Mon Sep 17 00:00:00 2001 From: Syed Sadat Ali Date: Wed, 3 Apr 2024 17:26:24 +0530 Subject: [PATCH 4/6] Task ellaborated --- .../Git-Workflows-with-automated-CI-CD-Integration.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md index 39686af..56368f4 100644 --- a/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md +++ b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md @@ -40,10 +40,19 @@ https://codefresh.io/learn/github-actions/github-actions-tutorial-and-examples/ * Configure a continuous integration (CI) system (e.g., GitHub Actions, Jenkins, Travis CI) to automate testing and code quality checks. * Integrate CI tools such as GitHub Actions into the project workflow. * Define CI pipelines to automate testing, code analysis, and deployment processes. + * Define trigger events + * Checkout Code + * Install Dependencies (e.g. Node.js - npm install) + * Code Analysis (Analyse the code syntax using the super linter or any other code specific linter) + * Use the Stale action to automate the process of discarding stale issues or Pull requests + * Use the labeler action and automate the process of labeling the pull requests + * Deployment (Optional) * You should write your own pipeline configuration * Test your CI/CD pipeline - * Implement a feature from start to deployment testing the pipeline with various errors during the process (Incorrect syntax, code styling using linters) + * Implement a feature from start to deployment testing the pipeline with various errors during the process (Incorrect syntax, code styling) * Push these changes to feature branches. + * Verify that the pipeline performs the defined actions accurately and efficiently. + * Review pipeline logs, test results, and code analysis reports for any issues or failures. * Ensure the pipeline handles various scenarios like feature releases and syntax errors appropriately. * Document your workflow process, including branching strategies, pull request guidelines, and CI configuration. From f46d259086b4ff1e2d812cc14a67a5d17df8481b Mon Sep 17 00:00:00 2001 From: Syed Sadat Ali Date: Wed, 3 Apr 2024 17:28:57 +0530 Subject: [PATCH 5/6] Materials added --- .../Git-Workflows-with-automated-CI-CD-Integration.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md index 56368f4..2de8ef1 100644 --- a/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md +++ b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md @@ -20,8 +20,10 @@ The workflow is divided into jobs, and each job performs a set of steps. Each st https://www.atlassian.com/git/tutorials/comparing-workflows https://www.redhat.com/sysadmin/git-hooks +https://www.atlassian.com/git/tutorials/git-hooks https://docs.github.com/en/actions/using-workflows/about-workflows https://codefresh.io/learn/github-actions/github-actions-tutorial-and-examples/ +https://www.freecodecamp.org/news/github-super-linter/ ## What you need to do From 7f5f10589f8bb02f7e739b2e37c16e1853cbe70a Mon Sep 17 00:00:00 2001 From: Syed Sadat Ali Date: Wed, 3 Apr 2024 17:47:03 +0530 Subject: [PATCH 6/6] CI --- ...Workflows-with-automated-CI-CD-Integration.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md index 2de8ef1..9a9f525 100644 --- a/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md +++ b/Teaching/Git Workflows with Automated CI/CD Integration/Git-Workflows-with-automated-CI-CD-Integration.md @@ -18,12 +18,12 @@ The workflow is divided into jobs, and each job performs a set of steps. Each st ## Materials -https://www.atlassian.com/git/tutorials/comparing-workflows -https://www.redhat.com/sysadmin/git-hooks -https://www.atlassian.com/git/tutorials/git-hooks -https://docs.github.com/en/actions/using-workflows/about-workflows -https://codefresh.io/learn/github-actions/github-actions-tutorial-and-examples/ -https://www.freecodecamp.org/news/github-super-linter/ +* https://www.atlassian.com/git/tutorials/comparing-workflows +* https://www.redhat.com/sysadmin/git-hooks +* https://www.atlassian.com/git/tutorials/git-hooks +* https://docs.github.com/en/actions/using-workflows/about-workflows +* https://codefresh.io/learn/github-actions/github-actions-tutorial-and-examples/ +* https://www.freecodecamp.org/news/github-super-linter/ ## What you need to do @@ -39,7 +39,7 @@ https://www.freecodecamp.org/news/github-super-linter/ * Create feature branches for new developments and bug fixes. * Demonstrate the process of making changes, staging commits, and merging branches. * Highlight best practices for resolving merge conflicts and ensuring branch consistency. -* Configure a continuous integration (CI) system (e.g., GitHub Actions, Jenkins, Travis CI) to automate testing and code quality checks. +* Configure a continuous integration (CI) system to automate testing and code quality checks. * Integrate CI tools such as GitHub Actions into the project workflow. * Define CI pipelines to automate testing, code analysis, and deployment processes. * Define trigger events @@ -68,7 +68,7 @@ https://www.freecodecamp.org/news/github-super-linter/ ## Tech Stack -Git, CI/CD tools (e.g., GitHub Actions, Jenkins). +Git, CI/CD tools. ## Learning from the task