Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
bc26e6c
feat: implement lab01 devops info service
newspec Jan 25, 2026
2601ee1
fix: minor fixes
newspec Jan 25, 2026
1bde0ad
feat: lab01 bonus task completed
newspec Jan 25, 2026
6e7babe
feat: LAB02 done
newspec Feb 1, 2026
26a6262
feat: lab02 bonus task is done
newspec Feb 1, 2026
9402155
feat: lab03 task2 workflow ready
newspec Feb 9, 2026
fe8455c
feat: workflow added
newspec Feb 9, 2026
6fddd34
feat: workflow added
newspec Feb 9, 2026
04fc643
feat: workflow updated
newspec Feb 9, 2026
90a3723
fix: minor workflow fix
newspec Feb 9, 2026
db7c90f
fix: change the name of the workflow
newspec Feb 9, 2026
20c09a6
feat: add caching in workflow
newspec Feb 9, 2026
5be24fa
feat: add caching in workflow(check improvement)
newspec Feb 9, 2026
b257c59
feat: snyk added into workflow
newspec Feb 9, 2026
a576f84
fix: snyk
newspec Feb 9, 2026
8dc6f9f
fix: snyk added --file path
newspec Feb 9, 2026
ba08efb
fix: snyk added dependencies
newspec Feb 9, 2026
9a4ab4f
fix: snyk
newspec Feb 9, 2026
b6ec2c9
feat (workflow): docker caching ebable
newspec Feb 9, 2026
9272242
fix (workflow): docker
newspec Feb 9, 2026
053b963
fix (workflow): docker
newspec Feb 9, 2026
a382d1d
feat: check how caching works
newspec Feb 9, 2026
89270d4
cold run
newspec Feb 9, 2026
ef0c471
warm run
newspec Feb 9, 2026
8a8eb35
feat: lab03 completed
newspec Feb 9, 2026
55afb8d
only go file changed
newspec Feb 9, 2026
be33cae
Only python file changed
newspec Feb 9, 2026
1f09d67
only python files changes
newspec Feb 9, 2026
ff1f215
both python and go files changed
newspec Feb 9, 2026
8e5eece
fix (codecov): report links and flags
newspec Feb 9, 2026
88ca03e
fix (codecod): paths
newspec Feb 9, 2026
0bdb024
fixes
newspec Feb 9, 2026
6ae7df7
feat: lab03 bonus task completed
newspec Feb 9, 2026
0b725d5
feat: lab04 completed
Feb 17, 2026
383ef5e
feat: lab04 completed
Feb 17, 2026
d482568
feat: lab04 completed
Feb 17, 2026
c248abb
feat: lab04 completed
Feb 17, 2026
ba3ad72
feat: lab04 completed
Feb 17, 2026
477ec3e
feat: lab04 completed
Feb 17, 2026
301e324
feat lab04: completed
Feb 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .github/workflows/go-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Go ci

on:
push:
branches: ["lab03", "master"]
paths:
- "app_go/**"
- ".github/workflows/go-ci.yml"
pull_request:
branches: ["lab03", "master"]
paths:
- "app_go/**"
- ".github/workflows/go-ci.yml"

jobs:
test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app_go
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: true

- name: Go fmt check
run: |
test -z "$(gofmt -l .)"

- name: Run tests with coverage
working-directory: app_go
run: go test -coverprofile=coverage.out ./...

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
with:
name: go-coverage
path: app_go/coverage.out

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: app_go/coverage.out
flags: go
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app_go
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: "1.22"
cache: true

- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61.0
working-directory: app_go

docker:
needs: [test, lint]
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/lab03' || github.ref == 'refs/heads/master')
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Generate version
run: echo "VERSION=$(date -u +%Y.%m.%d)" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./app_go
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/go_app:${{ env.VERSION }}
${{ secrets.DOCKER_USERNAME }}/go_app:${{ github.sha }}
${{ secrets.DOCKER_USERNAME }}/go_app:latest
cache-from: type=gha
cache-to: type=gha,mode=max
99 changes: 99 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Python ci


on:
push:
branches: [ "lab03", "master" ]
paths:
- 'app_python/**'
- '.github/workflows/python-ci.yml'
pull_request:
branches: [ "lab03", "master" ]
paths:
- 'app_python/**'
- '.github/workflows/python-ci.yml'

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.12
cache: "pip"
cache-dependency-path: app_python/requirements.txt

- name: Install dependencies
run: pip install -r app_python/requirements.txt

- name: Run linter
run: flake8

- name: Run tests
working-directory: app_python
run: pytest --cov=. --cov-report=xml:coverage.xml --cov-report=term

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: app_python/coverage.xml
fail_ci_if_error: true
flags: python
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
cache-dependency-path: app_python/requirements.txt

- name: Install dependencies
run: pip install -r app_python/requirements.txt

- name: Setup Snyk CLI
uses: snyk/actions/setup@master

- name: Run Snyk (dependencies)
working-directory: app_python
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
run: snyk test --severity-threshold=high

docker:
needs: [ test, security ]
runs-on: ubuntu-latest
if: github.event_name == 'push' && (github.ref == 'refs/heads/lab03' || github.ref == 'refs/heads/master')
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Generate version
run: echo "VERSION=$(date -u +%Y.%m.%d)" >> $GITHUB_ENV

- name: Build and push
uses: docker/build-push-action@v6
with:
context: ./app_python
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/python_app:${{ env.VERSION }}
${{ secrets.DOCKER_USERNAME }}/python_app:${{ github.sha }}
${{ secrets.DOCKER_USERNAME }}/python_app:latest
cache-from: type=gha
cache-to: type=gha,mode=max

94 changes: 94 additions & 0 deletions .github/workflows/terraform-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Terraform CI

on:
pull_request:
paths:
- 'terraform/**'
- '.github/workflows/terraform-ci.yml'
push:
branches:
- lab04
paths:
- 'terraform/**'
- '.github/workflows/terraform-ci.yml'

jobs:
terraform-validate:
name: Terraform Validation
runs-on: ubuntu-latest

defaults:
run:
working-directory: terraform

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.0

- name: Terraform Format Check
id: fmt
run: terraform fmt -check -recursive
continue-on-error: true

- name: Terraform Init
id: init
run: terraform init -backend=false

- name: Terraform Validate
id: validate
run: |
terraform validate -no-color | tee validate.txt

- name: Setup TFLint
uses: terraform-linters/setup-tflint@v4
with:
tflint_version: latest

- name: Initialize TFLint
run: tflint --init

- name: Run TFLint
id: tflint
run: tflint --format compact
continue-on-error: true

- name: Comment PR with Results
if: github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const validateOut = fs.existsSync('terraform/validate.txt')
? fs.readFileSync('terraform/validate.txt', 'utf8')
: 'No validation output';

const output = `#### Terraform Format and Style 🖌\`${{ steps.fmt.outcome }}\`
#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\`
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\`
#### TFLint 🔍\`${{ steps.tflint.outcome }}\`

<details><summary>Show Validation Output</summary>

\`\`\`
${validateOut}
\`\`\`

</details>

*Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Workflow: \`${{ github.workflow }}\`*`;

github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: output
})

- name: Fail if validation failed
if: steps.fmt.outcome == 'failure' || steps.validate.outcome == 'failure'
run: exit 1
71 changes: 70 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,70 @@
test
# General
test
.DS_Store
*.log

# Terraform
*.terraform.lock.hcl
*.tfstate
*.tfstate.*
.terraform/
terraform.tfvars
*.tfvars
crash.log
crash.*.log
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Pulumi
pulumi/venv/
pulumi/__pycache__/
Pulumi.*.yaml
.pulumi/

# Cloud credentials
*.pem
*.key
*.json
credentials
.aws/
.azure/
.gcp/

# IDE
.vscode/
.idea/
*.swp
*.swo
*~

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
ENV/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg

# Node
node_modules/
npm-debug.log
yarn-error.log
9 changes: 9 additions & 0 deletions app_go/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.git
*.md
docs/
bin/
dist/
tmp/
.idea/
.vscode/
.DS_Store
Loading
Loading