Skip to content

Commit

Permalink
Ajout des améliorations infra suite à l'intégration TDB (#291)
Browse files Browse the repository at this point in the history
  • Loading branch information
moroine authored Sep 12, 2023
2 parents 3974a6e + 491cfe9 commit c1c1e5a
Show file tree
Hide file tree
Showing 195 changed files with 1,805 additions and 3,536 deletions.
2 changes: 2 additions & 0 deletions .bin/scripts/build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ get_channel() {

if [ "$channel" == "$version" ]; then
channel="latest"
else
channel=$(echo $channel | cut -d '.' -f 1 )
fi

echo $channel
Expand Down
7 changes: 5 additions & 2 deletions .bin/scripts/release-interactive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@ set -euo pipefail

echo "Push les images docker de BAL sur le registry github (https://ghcr.io/mission-apprentissage/)"

readonly VERSION=$(${ROOT_DIR}/.bin/scripts/get-version.sh)
readonly VERSION=$("${ROOT_DIR}/.bin/scripts/get-version.sh")

get_channel() {
local version="$1"
channel=$(echo "$version" | cut -d '-' -f 2)

if [ -z "$channel" ]; then
if [ "$channel" == "$version" ]; then
channel="latest"
echo $channel
else
channel=$(echo $channel | cut -d '.' -f 1 )
fi

echo $channel
Expand Down
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

16 changes: 3 additions & 13 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"env": {
"es2021": true,
"es2022": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended"
],
"extends": ["eslint:recommended", "plugin:react/recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaFeatures": {
Expand All @@ -16,13 +12,7 @@
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"react",
"@typescript-eslint",
"simple-import-sort",
"import",
"unused-imports"
],
"plugins": ["react", "@typescript-eslint", "simple-import-sort", "import", "unused-imports"],
"rules": {
"simple-import-sort/imports": "error",
"react/react-in-jsx-scope": "off",
Expand Down
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
# Autodetect text files
* text=auto

# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf

# Vault
.infra/vault/vault.yml diff=diff-vault merge=merge-vault

# Force images/fonts to be handled as binaries
# Documents
*.doc diff=astextplain
Expand Down
11 changes: 5 additions & 6 deletions .github/ISSUE_TEMPLATE/bug.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
name: Bug
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Utilisateur**
_non connecté/Réseau CMA/DREETS Normandie/..._
_non connecté/Réseau CMA/DREETS Normandie/..._

**OS**
_Windows 10/Windows 7/..._
Expand All @@ -27,6 +26,6 @@ _1. Se connecter au tableau de bord en tant qu'utilisateur réseau_
_2. Cliquer sur le filtre CFA_
_3. La liste de résultats ne s'affiche pas_

* **Screenshot/enregistrement écran** *
- **Screenshot/enregistrement écran** \*

** Informations supplémentaires **
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/carte-par-d-faut.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Carte par défaut
about: Template par défaut d'une carte
title: ''
labels: ''
assignees: ''

title: ""
labels: ""
assignees: ""
---

**Objectif**
Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/feedback.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Feedback utilisateurice
about: Template par défaut d'une carte
title: ''
title: ""
labels: feedback
assignees: ''

assignees: ""
---

**Feedback**
Expand All @@ -13,4 +12,4 @@ _Décrire ici le feedback utilisateur_
**Occurences**
| Profil | Verbatim | Nb de fois |
| -------- | -------- | -------- |
Ex: DREETS | "verbatim" | 1
Ex: DREETS | "verbatim" | 1
11 changes: 2 additions & 9 deletions .github/workflows/_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
options:
- production
- recette
- test
app_version:
description: app version
type: string
Expand All @@ -31,12 +30,6 @@ on:
DEPLOY_SSH_PRIVATE_KEY:
description: SSH private key
required: true
SSH_KNOWN_HOSTS:
description: SSH known hosts list
required: true
DEPLOY_USERNAME:
description: SSH USER TO DEPLOY
required: true
DEPLOY_PASS:
description: SSH PWD TO DEPLOY
required: true
Expand All @@ -62,7 +55,7 @@ jobs:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install SSH key
uses: shimataro/ssh-key-action@v2
Expand All @@ -81,7 +74,7 @@ jobs:
run: .bin/mna-bal deploy ${{ inputs.environment }} --extra-vars "app_version=${{ inputs.app_version }}"
env:
ANSIBLE_VAULT_PASSWORD_FILE: .infra/.vault_pwd.txt
ANSIBLE_REMOTE_USER: ${{ secrets.DEPLOY_USERNAME }}
ANSIBLE_REMOTE_USER: deploy
ANSIBLE_BECOME_PASS: ${{ secrets.DEPLOY_PASS }}

- name: Notify failure on Slack
Expand Down
96 changes: 0 additions & 96 deletions .github/workflows/_setup.yml

This file was deleted.

22 changes: 17 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: CI

on:
workflow_call:
secrets:
CODECOV_TOKEN:
description: Code coverrage token
required: true
outputs:
status:
description: Whether deployment succeeded or not
value: ${{ jobs.deploy.outputs.status }}
inputs:
coverage:
required: false
type: boolean
default: false

jobs:
tests:
runs-on: ubuntu-latest
Expand All @@ -19,7 +22,7 @@ jobs:
- "27017:27017"
steps:
- name: Checkout project
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -48,8 +51,17 @@ jobs:

- name: test
run: yarn test:ci
if: ${{ !inputs.coverage }}

- name: test with coverage
run: yarn test:ci:coverage
if: ${{ inputs.coverage }}

- name: prettier
run: yarn prettier:check

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
if: ${{ inputs.coverage }}
10 changes: 6 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
name: "CodeQL"

on:
push:
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [main]
Expand Down Expand Up @@ -39,15 +41,15 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
Loading

0 comments on commit c1c1e5a

Please sign in to comment.