This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
Feat/add pipeline #520
Open
wesleyfideles
wants to merge
7
commits into
DadosAbertosDeFeira:main
Choose a base branch
from
wesleyfideles:feat/add-pipeline
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feat/add pipeline #520
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
97d6a66
Primeiro Commit add-pipeline
wesleyfideles f33e25f
Ajuste de TAG do Pipeline
wesleyfideles b24dd3c
Adicionando hadolint ignore no Dockerfile
wesleyfideles 71abed4
Adicionando hadolint ignore no Dockerfile dnv
wesleyfideles 7d7e09d
Adicionando .trivyignore
wesleyfideles b237ab8
testando
wesleyfideles faa4061
Testando git no Linux
wesleyfideles File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
@@ -1,70 +1,15 @@ | ||||||||
name: CI | ||||||||
|
||||||||
on: [ push, pull_request ] | ||||||||
|
||||||||
name: "Pipeline para build de imagem docker" | ||||||||
on: | ||||||||
push: | ||||||||
release: | ||||||||
types: [created] | ||||||||
jobs: | ||||||||
build: | ||||||||
runs-on: ubuntu-18.04 | ||||||||
steps: | ||||||||
- uses: actions/checkout@v2 | ||||||||
- name: Set up Python | ||||||||
uses: actions/setup-python@v2 | ||||||||
with: | ||||||||
python-version: 3.8 | ||||||||
- name: Install Dependencies | ||||||||
run: | | ||||||||
python -m pip install --upgrade pip | ||||||||
pip install -r dev_requirements.txt | ||||||||
- name: Lint | ||||||||
run: | | ||||||||
black --check . | ||||||||
flake8 . | ||||||||
- name: Check migrations | ||||||||
env: | ||||||||
DJANGO_SETTINGS_MODULE: "web.settings" | ||||||||
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/mariaquiteria" | ||||||||
run: python manage.py makemigrations --check | ||||||||
- name: Run Tests | ||||||||
env: | ||||||||
DJANGO_SETTINGS_MODULE: "web.settings" | ||||||||
DJANGO_CONFIGURATION: "Test" | ||||||||
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/mariaquiteria" | ||||||||
run: | | ||||||||
python manage.py collectstatic | ||||||||
pytest | ||||||||
services: | ||||||||
postgres: | ||||||||
image: library/postgres:11-alpine | ||||||||
env: | ||||||||
POSTGRES_PASSWORD: postgres | ||||||||
POSTGRES_DB: mariaquiteria | ||||||||
ports: | ||||||||
- 5432:5432 | ||||||||
options: >- | ||||||||
--health-cmd pg_isready | ||||||||
--health-interval 10s | ||||||||
--health-timeout 5s | ||||||||
--health-retries 5 | ||||||||
rabbitmq: | ||||||||
image: rabbitmq | ||||||||
env: | ||||||||
RABBITMQ_DEFAULT_USER: guest | ||||||||
RABBITMQ_DEFAULT_PASS: guest | ||||||||
ports: | ||||||||
- 5672:5672 | ||||||||
deploy: | ||||||||
runs-on: ubuntu-18.04 | ||||||||
if: github.ref == 'refs/heads/main' | ||||||||
docker: | ||||||||
uses: "mentoriaiac/cicd_centralizado/.github/workflows/docker_build.yaml@v1" | ||||||||
with: | ||||||||
image: wf975621/mariaqueteria | ||||||||
|
||||||||
steps: | ||||||||
- uses: actions/checkout@v2 | ||||||||
with: | ||||||||
fetch-depth: 0 | ||||||||
- name: Push to dokku | ||||||||
uses: dokku/github-action@v1.0.2 | ||||||||
with: | ||||||||
branch: main | ||||||||
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} | ||||||||
git_remote_url: ${{ secrets.DOKKU_REMOTE_URL }} | ||||||||
ssh_host_key: ${{ secrets.SSH_HOST_KEY }} | ||||||||
needs: [build] | ||||||||
push_image: ${{github.event_name == 'release'}} | ||||||||
secrets: | ||||||||
docker_user: ${{secrets.DOCKER_LOGIN}} | ||||||||
docker_password: ${{secrets.TOKEN_DOCKERHUB}} | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Quebra de linha |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CVE-2022-1304 | ||
CVE-2021-3999 | ||
CVE-2019-8457 | ||
CVE-2021-33560 | ||
CVE-2022-2509 | ||
CVE-2022-29458 | ||
CVE-2022-1586 | ||
CVE-2022-1587 | ||
CVE-2022-2097 | ||
CVE-2020-16156 | ||
CVE-2022-34265 | ||
CVE-2017-14158 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pode adicionar uma quebra de linha aqui também? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Temos um typo por aqui :)
mariaquiteria