|
| 1 | +# LAB03 --- CI/CD Pipeline with GitHub Actions |
| 2 | + |
| 3 | +## CI/CD Practices Applied |
| 4 | + |
| 5 | +### Automated Builds |
| 6 | + |
| 7 | +Docker image is automatically built on push and pull requests using |
| 8 | +GitHub Actions. |
| 9 | + |
| 10 | +### Secure Secrets Management |
| 11 | + |
| 12 | +Sensitive data stored in GitHub Repository Secrets instead of hardcoding |
| 13 | +credentials. |
| 14 | + |
| 15 | +### Container Security Scanning |
| 16 | + |
| 17 | +Snyk integrated into pipeline to scan Docker image for vulnerabilities. |
| 18 | + |
| 19 | +### Continuous Delivery |
| 20 | + |
| 21 | +Docker image automatically pushed to DockerHub after successful pipeline |
| 22 | +execution. |
| 23 | + |
| 24 | +------------------------------------------------------------------------ |
| 25 | + |
| 26 | +## Pipeline Information & Decisions |
| 27 | + |
| 28 | +CI Platform: GitHub Actions\ |
| 29 | +Container Registry: DockerHub\ |
| 30 | +Security Scanner: Snyk |
| 31 | + |
| 32 | +Triggers: - push to main - pull requests |
| 33 | + |
| 34 | +Pipeline Stages: 1. Repository checkout 2. Docker image build 3. |
| 35 | +Security scan with Snyk 4. DockerHub login 5. Image push to registry |
| 36 | + |
| 37 | +------------------------------------------------------------------------ |
| 38 | + |
| 39 | +## Workflow Execution Process |
| 40 | + |
| 41 | +### Automatic Trigger |
| 42 | + |
| 43 | +Pipeline runs when: |
| 44 | + |
| 45 | +- code is pushed |
| 46 | +- pull request is created |
| 47 | + |
| 48 | +### Build Stage |
| 49 | + |
| 50 | +Docker image built using: |
| 51 | + |
| 52 | +docker build -t devops-info-service . |
| 53 | + |
| 54 | +### Security Scan |
| 55 | + |
| 56 | +Snyk scans Docker image for known vulnerabilities before publishing. |
| 57 | + |
| 58 | +### Push Stage |
| 59 | + |
| 60 | +Image pushed to: |
| 61 | + |
| 62 | +maksimmenshikh/devops-info-service |
| 63 | + |
| 64 | +------------------------------------------------------------------------ |
| 65 | + |
| 66 | +## Technical Analysis |
| 67 | + |
| 68 | +Automated CI reduces manual deployment steps and human error. |
| 69 | + |
| 70 | +Secrets stored in GitHub prevent credential exposure in repository code. |
| 71 | + |
| 72 | +Security scanning ensures vulnerabilities are detected early in |
| 73 | +development. |
| 74 | + |
| 75 | +Automated publishing guarantees consistent container versions. |
| 76 | + |
| 77 | +------------------------------------------------------------------------ |
| 78 | + |
| 79 | +## Challenges & Solutions |
| 80 | + |
| 81 | +### Missing Secrets |
| 82 | + |
| 83 | +Pipeline failed due to missing repository secrets.\ |
| 84 | +Solved by adding DOCKERHUB_TOKEN, DOCKERHUB_USERNAME and SNYK_TOKEN. |
| 85 | + |
| 86 | +### Docker Authentication Failure |
| 87 | + |
| 88 | +Fixed by generating DockerHub access token and configuring |
| 89 | +docker/login-action. |
| 90 | + |
| 91 | +### Failed Security Scan |
| 92 | + |
| 93 | +Resolved by rebuilding image and ensuring dependencies were up to date. |
0 commit comments