Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
71a0b27
feat: lab1 complete python app
cuprum-acid Jan 23, 2025
40f1105
feat: improve documentation
cuprum-acid Jan 23, 2025
c79531c
fix: typo in documentation
cuprum-acid Jan 23, 2025
03a8802
feat: add app_ruby
cuprum-acid Jan 23, 2025
f70f3d7
feat: update documentation
cuprum-acid Jan 23, 2025
521a521
Merge branch 'inno-devops-labs:master' into lab2
cuprum-acid Jan 24, 2025
bbafa98
feat: lab2 basic part
cuprum-acid Jan 24, 2025
92f21b9
feat: improve documentation
cuprum-acid Jan 24, 2025
8fa54bc
feat: improve ruby app
cuprum-acid Jan 25, 2025
148852f
feat: improve documentation
cuprum-acid Jan 25, 2025
ae7c421
feat: lab2 bonus distroless
cuprum-acid Jan 27, 2025
83b439d
Merge branch 'inno-devops-labs:master' into lab2
cuprum-acid Jan 27, 2025
de1c7a0
feat: improve documentation
cuprum-acid Jan 27, 2025
540b56e
feat: improve documentation
cuprum-acid Jan 27, 2025
fc280d8
fix: typo in documentation
cuprum-acid Jan 27, 2025
d9dbf17
feat: remove useless lines
cuprum-acid Jan 30, 2025
1b57e2e
feat: improve tests and documentation
cuprum-acid Feb 1, 2025
ccc1459
feat: add ci for python
cuprum-acid Feb 1, 2025
09522b0
feat: add documentation about ci
cuprum-acid Feb 1, 2025
591b3eb
feat: add ruby ci
cuprum-acid Feb 1, 2025
b73f2d8
fix: ruby ci
cuprum-acid Feb 1, 2025
e25ba9a
feat: add more tests
cuprum-acid Feb 1, 2025
cd4c99a
feat: documentation
cuprum-acid Feb 1, 2025
698c0ee
feat: improve ci
cuprum-acid Feb 4, 2025
a0f72de
fix: add checkout
cuprum-acid Feb 4, 2025
1d932d1
feat: improve cache
cuprum-acid Feb 4, 2025
7ba1839
feat: add terraform IaC
cuprum-acid Feb 3, 2025
24cf102
feat: improve documentation
cuprum-acid Feb 3, 2025
6a7d956
feat: ansible lab
cuprum-acid Feb 10, 2025
7d08678
Merge branch 'inno-devops-labs:master' into lab5
cuprum-acid Feb 10, 2025
3cd5eda
feat: deploy apps with ansible
cuprum-acid Feb 13, 2025
c9d0181
hotfix: update vulnerable gem
cuprum-acid Feb 13, 2025
682da71
hotfix: Gemfile.lock updated
cuprum-acid Feb 13, 2025
3f0c528
feat: fix pipeline
cuprum-acid Feb 13, 2025
90ca0d2
add logging in python app
cuprum-acid Feb 19, 2025
4eb3e4c
change some variables
cuprum-acid Feb 19, 2025
c793b6b
add logging stack
cuprum-acid Feb 20, 2025
de464eb
feat: improve documentation
cuprum-acid Feb 21, 2025
8cb98a4
feat: improve documentation
cuprum-acid Feb 21, 2025
e7b73e5
fix: ruby dockerfile
cuprum-acid Feb 21, 2025
b2a7c13
feat: set up prometheus
cuprum-acid Feb 21, 2025
4ff29ab
feat: add documentation
cuprum-acid Feb 21, 2025
740e53b
feat: configuration enhancements
cuprum-acid Feb 21, 2025
e5df8b8
feat: metrics in apps
cuprum-acid Feb 21, 2025
be9d99a
feat: add documentation
cuprum-acid Feb 21, 2025
47e7c39
feat: add kubernetes manifests
cuprum-acid Feb 23, 2025
72f82b9
feat: improve documentation
cuprum-acid Feb 23, 2025
5394d21
Merge branch 'inno-devops-labs:master' into lab9
cuprum-acid Feb 23, 2025
09d20b3
feat: add helm charts
cuprum-acid Feb 26, 2025
598d4c9
feat: improve documentation
cuprum-acid Feb 26, 2025
88316a2
Merge branch 'inno-devops-labs:master' into lab11
cuprum-acid Mar 4, 2025
6c7e0cd
feat: complete lab11
cuprum-acid Mar 4, 2025
6a83657
feat: upgrade application for persistence
cuprum-acid Mar 16, 2025
0a91bc8
chore: lint code
cuprum-acid Mar 16, 2025
c1c7daa
fix: fix pytests
cuprum-acid Mar 16, 2025
cff6f42
lab12 complete
cuprum-acid Mar 16, 2025
64972e1
lab12 bonus
cuprum-acid Mar 16, 2025
4aacf09
lab12 configmap bouns
cuprum-acid Mar 16, 2025
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
127 changes: 127 additions & 0 deletions .github/workflows/app_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
name: CI for app_python

on:
push:
paths:
- 'app_python/**'
- '.github/workflows/app_python.yml'
pull_request:
paths:
- 'app_python/**'
- '.github/workflows/app_python.yml'

defaults:
run:
working-directory: app_python

jobs:
lint_and_format:
timeout-minutes: 2
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pylint

- name: Run code formatter (black)
uses: psf/black@stable
with:
options: "--check --diff"
src: "./app_python"

- name: Run linter (pylint)
run: pylint app.py --disable=R,C

test:
timeout-minutes: 2
runs-on: ubuntu-22.04
needs: lint_and_format
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest requests

- name: Run tests
run: pytest test_app.py

security_scan:
timeout-minutes: 5
runs-on: ubuntu-22.04
needs: [lint_and_format, test]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/python-3.10@master
with:
args: --skip-unresolved app_python/
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}


docker_build_and_push:
timeout-minutes: 10
runs-on: ubuntu-22.04
needs: [lint_and_format, test, security_scan]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get short commit hash
id: commit
run: echo "SHORT_COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: docker.io

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:app_python"
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/moscow-time:${{ env.SHORT_COMMIT_HASH }}
${{ secrets.DOCKERHUB_USERNAME }}/moscow-time:${{ env.SHORT_COMMIT_HASH }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha,type=registry,ref=ghcr.io/${{ github.repository_owner }}/moscow-time:buildcache
cache-to: type=gha,mode=max,type=registry,ref=ghcr.io/${{ github.repository_owner }}/moscow-time:buildcache,mode=max
119 changes: 119 additions & 0 deletions .github/workflows/app_ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: CI for app_ruby

on:
push:
paths:
- 'app_ruby/**'
- '.github/workflows/app_ruby.yml'
pull_request:
paths:
- 'app_ruby/**'
- '.github/workflows/app_ruby.yml'

defaults:
run:
working-directory: app_ruby

jobs:
lint_and_format:
timeout-minutes: 2
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true

- name: Install dependencies
run: |
gem install bundler
bundle install

- name: Run RuboCop
run: bundle exec rubocop -A

test:
timeout-minutes: 2
runs-on: ubuntu-22.04
needs: lint_and_format
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true

- name: Install dependencies
run: |
gem install bundler
bundle install

- name: Run tests
run: bundle exec rspec

security_scan:
timeout-minutes: 5
runs-on: ubuntu-22.04
needs: [lint_and_format, test]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/ruby@master
continue-on-error: true
with:
args: --skip-unresolved app_ruby/
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}

docker_build_and_push:
timeout-minutes: 10
runs-on: ubuntu-22.04
needs: [lint_and_format, test, security_scan]
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get short commit hash
id: commit
run: echo "SHORT_COMMIT_HASH=$(echo ${GITHUB_SHA} | cut -c1-7)" >> $GITHUB_ENV

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
platforms: linux/amd64,linux/arm64,linux/arm/v7

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io

- name: Log in to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: docker.io

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:app_ruby"
push: true
tags: |
ghcr.io/${{ github.repository_owner }}/omsk-time:${{ env.SHORT_COMMIT_HASH }}
${{ secrets.DOCKERHUB_USERNAME }}/omsk-time:${{ env.SHORT_COMMIT_HASH }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=gha,type=registry,ref=ghcr.io/${{ github.repository_owner }}/omsk-time:buildcache
cache-to: type=gha,mode=max,type=registry,ref=ghcr.io/${{ github.repository_owner }}/omsk-time:buildcache,mode=max
4 changes: 4 additions & 0 deletions ansible/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fact_cache/
__pycache__/
.ansible/
yacloud_token
Loading
Loading