diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..5303cb92 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,13 @@ +## Goal +- What does this PR accomplish? + +## Changes +- What was modified? + +## Testing +- What was modified? + +### Checklist: +- [ ] Clear title and description. +- [ ] Documentation/README updated if needed. +- [ ] No secrets or large temporary files. \ No newline at end of file diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 00000000..2b06c9fd --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,44 @@ +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 + +on: + workflow_dispatch: + +jobs: + Explore-GitHub-Actions: + runs-on: ubuntu-latest + steps: + - run: echo "Triggered by ${{ github.event_name }}" + + - name: Check out repository code + uses: actions/checkout@v5 + + - name: System info + run: | + echo "" + echo "========================================" + echo "SYSTEM INFORMATION" + echo "========================================" + + echo "" + echo "--- RUNNER INFORMATION ---" + echo "Runner name: ${{ runner.name }}" + echo "Runner OS: ${{ runner.os }}" + echo "Runner architecture: ${{ runner.arch }}" + + echo "" + echo "--- OPERATING SYSTEM DETAILS ---" + cat /etc/os-release + + echo "" + echo "--- HARDWARE SPECIFICATIONS ---" + echo "CPU Model: $(lscpu | grep 'Model name' | cut -d':' -f2 | xargs)" + echo "CPU Cores: $(nproc)" + echo "CPU Architecture: $(uname -m)" + echo "Total Memory: $(free -h | grep 'Mem:' | awk '{print $2}')" + echo "Available Memory: $(free -h | grep 'Mem:' | awk '{print $7}')" + echo "Disk Size: $(df -h / | tail -1 | awk '{print $2}')" + echo "Disk Usage: $(df -h / | tail -1 | awk '{print $5}')" + + echo "" + echo "========================================" \ No newline at end of file diff --git a/labs/screenshot/Img1.png b/labs/screenshot/Img1.png new file mode 100644 index 00000000..283468eb Binary files /dev/null and b/labs/screenshot/Img1.png differ diff --git a/labs/screenshot/Img2.png b/labs/screenshot/Img2.png new file mode 100644 index 00000000..1b4a3556 Binary files /dev/null and b/labs/screenshot/Img2.png differ diff --git a/labs/submission1.md b/labs/submission1.md new file mode 100644 index 00000000..7c12f651 --- /dev/null +++ b/labs/submission1.md @@ -0,0 +1,13 @@ +# Lab 1 Submission +## Task 1 SSH Commit Signature Verification: +The signature of commits provides a cryptographic guarantee of authorship and code integrity, preventing forgery of commits and protecting against the introduction of malicious changes on someone else's behalf. In DevOps practices, this is critically important, since CI/CD systems trust only verified commits for automatic builds and deployments, which creates an additional level of security in the software supply chain. Signed commits also ensure compliance with security standards, provide an auditable trace of changes, and are displayed on platforms like GitHub with the "Verified" label, increasing trust in the code in team and open-source development. +#### Screenshots for Task 1: +![Verified Commit](screenshot/img1.png) + +PR templates standardize the code review process, forcing developers to describe changes in a structured manner. All PRS receive the same sections ("Purpose", "Changes", "Testing"), which saves reviewers time — they do not need to search for information in chaotic descriptions. Checklists automatically remind you of important actions.: tests, documentation, code style. In distributed teams, templates compensate for the lack of personal communication — a reviewer in a different time zone receives all the necessary information without additional questions. +## Task 2 PR Template & Checklist: +PR templates standardize the code review process, forcing developers to describe changes in a structured manner. All PR receive the same sections ("Purpose", "Changes", "Testing"), which saves reviewers time — they do not need to search for information in chaotic descriptions. Checklists automatically remind you of important actions.: tests, documentation, code style. In distributed teams, templates compensate for the lack of personal communication — a reviewer in a different time zone receives all the necessary information without additional questions. + +Challenges emerged during setup. I have some problem, while do Signing keys. +#### Screenshots for Task 2: +![PR template auto-filling the description.](screenshot/img2.png) \ No newline at end of file diff --git a/labs/submission3.md b/labs/submission3.md new file mode 100644 index 00000000..66743e4d --- /dev/null +++ b/labs/submission3.md @@ -0,0 +1,110 @@ +# Lab 3 Submission - GitHub Actions Workflows + +## Platform: GitHub Actions + +## Task 1 — First GitHub Actions Workflow + +### 1.1 Quickstart Implementation Observations + +**Steps Followed:** +1. Created `.github/workflows` directory in the repository +2. Created `github-actions-demo.yml` workflow file +3. Defined basic workflow with `push` trigger +4. Added jobs with multiple steps for printing information +5. Committed and pushed changes to trigger the workflow + +**Key Concepts Learned:** +- **Jobs**: Units of work that run on the same runner (my workflow had one job) +- **Steps**: Individual tasks within a job (multiple echo commands, checkout action) +- **Runners**: GitHub-hosted Linux server that executes the workflow +- **Triggers**: Events that start workflow execution (push in this case) +- **Actions**: Reusable units of code (like `actions/checkout@v5`) + +### 1.2 Test Workflow Trigger + +**Successful Run Link:** +[First Workflow Run - Push Trigger](https://github.com/group06854/DevOps-Intro/actions/runs/22184793461) + +**What Caused the Run:** +The workflow was triggered automatically by a `git push` event to the `feature/lab3` branch. When I committed and pushed the workflow YAML file, GitHub detected the changes and initiated the workflow. + +**Workflow Execution Analysis:** +1. **Trigger Phase**: Push event detected by GitHub +2. **Setup Phase**: GitHub provisioned a Linux runner +3. **Execution Phase**: + - Step 1: Echoed trigger information (identified as push event) + - Step 2: Displayed runner type (Linux server hosted by GitHub) + - Step 3: Showed branch name and repository details + - Step 4: `actions/checkout@v5` cloned the repository + - Step 5: Confirmed repository cloning + - Step 6: Listed repository contents + - Step 7: Final status message +4. **Completion Phase**: Job marked as successful + +## Task 2 — Manual Trigger + System Information + +### 2.1-2.2 Manual Trigger Implementation + +**Changes Made to Workflow File:** +Added `workflow_dispatch` trigger alongside the existing push trigger: + +```yaml +name: GitHub Actions Demo +run-name: ${{ github.actor }} is testing out GitHub Actions 🚀 +on: + workflow_dispatch: +``` +### 2.3 System Information Collection + +**Successful Manual Dispatch Run:** +[Second Workflow Run - Manual Trigger](https://github.com/group06854/DevOps-Intro/actions/runs/22221110750/job/64276486743) + +**Gathered System Information:**\ +--- RUNNER INFORMATION --- +Runner name: GitHub Actions 1000000267 +Runner OS: Linux +Runner architecture: X64 + +--- OPERATING SYSTEM DETAILS --- +PRETTY_NAME="Ubuntu 24.04.3 LTS" +NAME="Ubuntu" +VERSION_ID="24.04" +VERSION="24.04.3 LTS (Noble Numbat)" +VERSION_CODENAME=noble +ID=ubuntu +ID_LIKE=debian +HOME_URL="https://www.ubuntu.com/" +SUPPORT_URL="https://help.ubuntu.com/" +BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" +PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" +UBUNTU_CODENAME=noble +LOGO=ubuntu-logo + +--- HARDWARE SPECIFICATIONS --- +CPU Model: AMD EPYC 7763 64-Core Processor +CPU Cores: 4 +CPU Architecture: x86_64 +Total Memory: 15Gi +Available Memory: 14Gi +Disk Size: 145G +Disk Usage: 37% + +### Comparison: Manual vs Automatic Workflow Triggers + +| Aspect | Automatic (Push) | Manual (workflow_dispatch) | +|--------|------------------|----------------------------| +| **Trigger Method** | Code push to repository | Manual click in GitHub UI | +| **Use Case** | Continuous integration on code changes | On-demand testing, debugging | +| **Flexibility** | Fixed to specific branches | Can choose branch at runtime | +| **Parameters** | Limited to event data | Can accept input parameters | +| **When to Use** | Automated testing, deployment | Manual testing, scheduled runs | + +## Summary + +This lab demonstrated the fundamentals of GitHub Actions including: +- Basic workflow configuration with push triggers +- Manual workflow triggers via workflow_dispatch +- System information collection and analysis +- Understanding of runner environments + +The comparison between automatic and manual triggers shows the flexibility of GitHub Actions for different CI/CD scenarios, while the system information reveals the robust, consistent environment provided by GitHub-hosted runners. \ No newline at end of file