Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Teste IA #36

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
22 changes: 22 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: AI Code Reviewer

on:
pull_request:
types:
- opened
- synchronize
permissions: write-all
jobs:
review:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: AI Code Reviewer
uses: your-username/ai-code-reviewer@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENAI_API_MODEL: "gpt-4" # Optional: defaults to "gpt-4"
exclude: "**/*.json, **/*.md" # Optional: exclude patterns separated by commas
73 changes: 73 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI - Lint / Tests / Deploy

on: [push]

jobs:

lint:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8

- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics

tests:
needs: lint
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.5, 3.6, 3.7, 3.8, 3.9]

steps:
- uses: actions/checkout@v2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install flake8 pytest
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# - name: Integrations Test
# run: |
# python test.py


deploy:
needs: tests
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9

- name: deploy into heroku
uses: akhileshns/[email protected]
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME}}
heroku_email: ${{secrets.HEROKU_USER_EMAIL}}
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Trilha DevOps da 4Linux
# Trilha DevOps Alexandre Monteiro

<!-- Altere a Flag abaixo com sua URL do seu usuário do Github -->
<!--
![Pipeline Status](https://github.com/<USER>/DevOpsLab-HelloWorld/actions/workflows/pipeline.yml/badge.svg)
![Pipeline Status](https://github.com/alemonteiroficial/DevOpsLab-HelloWorld/actions/workflows/pipeline.yml/badge.svg)
-->

## Aplicação criada para exemplificar o Ciclo de uma PipeLine DevOps


Para maiores informações acesse o [Site da 4Linux](https://www.4linux.com.br/cursos/devops)
Para maiores informações acesse o [Site](https://www.alexandremonteiro.com.br/links)
Binary file added static/imgs/foto-alexandre.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/imgs/foto-alexandre.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 24 additions & 26 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,56 +5,54 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>DevOps Essentials</title>
<title>DevOps Alexandre Monteiro</title>
<link rel="stylesheet" href="/static/css/main.css">
</head>

<body>
<div class="alert">Escreva uma Mensagem para o Cabecalho da Pagina.</div>
<div class="alert">Seja bem vindo ao meu portifolio DevOps :D</div>

<div class="container">
<div class="logo">
<img src="/static/imgs/4linux.jpg" alt="4Linux">
<img src="/static/imgs/foto-alexandre.jpg" alt="4Linux">
</div>
</div>

<div class="container">
<div class="devops-paths">

<p class="keep-studying">Não fique parado, continue estudando sobre DevOps e Containers!</p>
<p class="keep-studying">Não existe derrota para quem estuda! Ou vence, ou aprende, compartilhe conhecimento!</p>

<div class="devops-path path">
<h1>Trilha DevOps</h1>
<a href="https://4linux.com.br/cursos/treinamento/ci-cd-integracao-e-entrega-continua-com-git-jenkins-nexus-e-sonar" class="devops-course course">
<h2>524 - CI/CD: INTEGRAÇÃO E ENTREGA CONTINUA COM GIT, JENKINS, NEXUS E SONAR</h2>
<h1>Mídias Sociais</h1>
<a href="https://www.linkedin.com/in/alemonteiroficial/" class="devops-course course">
<h2>CONHEÇA MINHA TRAGETORIA PROFISSIONAL PELO LINKEDIN</h2>
</a><!--
--><a href="https://4linux.com.br/cursos/treinamento/infraestrutura-agil-com-praticas-devops" class="devops-course course">
<h2>525 - INFRAESTRUTURA ÁGIL COM PRÁTICAS DEVOPS</h2>
--><a href="#" class="devops-course course">
<h2>BLOG PROFISSIONAL, DICAS, CURSOS, COMPARTILHAMENTOS</h2>
</a><!--
--><a href="https://www.4linux.com.br/curso/continuous-monitoring" class="ops-course course">
<h2>527 - DEVSECOPS: SEGURANÇA EM INFRAESTRUTURA E DESENVOLVIMENTO ÁGIL</h2>
--><a href="https://www.vivaolinux.com.br/~alexandrevl" class="ops-course course">
<h2>CONTRIBUIÇÕES PARA COMUNIDADE LINUX DEVOPS</h2>
</a><!--
--><a href="https://4linux.com.br/cursos/treinamento/praticas-de-continuous-monitoring-para-uma-infraestrutura-agil/" class="ops-course course">
<h2>528 - PRÁTICAS DE CONTINUOUS MONITORING PARA UMA INFRAESTRUTURA ÁGIL</h2>
--><a href="https://github.com/alemonteiroficial" class="ops-course course">
<h2>GITHUB, AQUI QUE A MÁGICA ACONTECE :)</h2>
</a>
</div>

<div class="ex-path path">
<h1>Trilha Containers</h1>
<a href="https://4linux.com.br/cursos/treinamento/docker-administracao-de-containers-dca" class="ex-course course">
<h2>540 - DOCKER: ADMINISTRAÇÃO DE CONTAINERS – DCA</h2>
</a><!--
--><a href="https://4linux.com.br/cursos/treinamento/kubernetes-orquestracao-de-ambientes-escalaveis" class="ex-course course">
<h2>541 - KUBERNETES: ORQUESTRAÇÃO DE AMBIENTES ESCALÁVEIS</h2>
</a><!--
--><a href="https://4linux.com.br/cursos/treinamento/openshift-administracao-paas-em-containers" class="ex-course course">
<h2>542 - OPENSHIFT: ADMINISTRAÇÃO PAAS EM CONTAINERS/</h2>
--><a href="https://alexandremonteiro.com.br" class="ops-course course">
<h2>AULAS ONLINES GRATUITAS, CLOUD, DEVOPS E ASSUNTOS DE TI. :)</h2>
</a>
</a><!--
--><a href="https://4linux.com.br/cursos/treinamento/gerenciamento-de-cluster-kubernetes-com-rancher" class="ex-course course">
<h2>543 - GERENCIAMENTO DE CLUSTER KUBERNETES COM RANCHER</h2>
--><a href="https://alexandremonteiro.com.br/mentoria" class="ops-course course">
<h2>MENTORIA EXCLUSIVA PARA DEVOPS.</h2>
</a>
</a><!--
--><a href="https://alexandremonteiro.com.br/squaddevops" class="ops-course course">
<h2>CURSO COMPLETO DE DEVOPS</h2>
</a>
</div>

<p class="keep-studying">Temos a tecnologia, recursos e capacidade para resolver todos os problemas do planeta. A única coisa que falta é a consciência inclusiva!</p>

</div>
</div>

Expand Down
6 changes: 3 additions & 3 deletions templates/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

- name: Integrations Test
run: |
python test.py
# - name: Integrations Test
# run: |
# python test.py


deploy:
Expand Down
6 changes: 3 additions & 3 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def test_conteudo(self):
result = self.app.get('/')

# verifica o retorno do conteudo da pagina
self.assertRegex(result.data.decode(), "Escreva uma Mensagem para o Cabecalho da Pagina.")
self.assertRegex(result.data.decode(), "Seja bem vindo ao meu portifolio DevOps :D")


if __name__ == "__main__":
print ('INICIANDO OS TESTES')
print ('INICIANDO O TESTE')
print('----------------------------------------------------------------------')
unittest.main(verbosity=2)
unittest.main(verbosity=2)