-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: use sqlite * snap * snap * fix * fix * fix * fix * fix * fix * fix * gh actions * fix * gha * fix * add indexing workflow * fix * gh * gh * fix * fix * fix * fix * fix * index: throw error * fix * chore: wkfl * fix workflows * fix: dev secrets * fix * update API and mapping * fix tests / sort out address issue from geo data * update query params * Update README.md * fix(ci): adjust resources * wip: indexing * feat(api): add swagger doc * wip: readmes * wip: k8s+gh actions * doc * fix(index): fix dockerfile * fix(index): wait longer and try harder * feat: add frontend demo * fix(front): REACT_APP_API_URL runtime variable * fix: snaps * fix(api): embed openapi.yaml * fix(api): swagger * fix(api): fix docker+swagger * fix(api): openapi * fix(api): onlyWithConvention -> convention + update front demo * fix: snaps * add not ranked option #73 #112 * upgrade packages / delete assembly * update github actions + move to node 16 * fix: #50 multiple convention for one etablissement * add prenom to naming searchfield * fix(ci): update workflows and default index * fix(ci): dev secrets * snaps * fix(ci): prod secrets * update and fix tests * chore: add codeql-config * chore: use codeql-config * feat: add additional api-legacy component * fix(ci): search labels Co-authored-by: Remi Mélisson <rmelisson@gmail.com>
- Loading branch information
Showing
89 changed files
with
17,807 additions
and
3,842 deletions.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: "CodeQL config" | ||
|
||
paths: | ||
- index | ||
- api | ||
paths-ignore: | ||
- api/swagger-ui |
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
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,15 @@ | ||
name: Deactivate | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
bury_review_env: | ||
name: 🪦 Review | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: SocialGouv/actions/autodevops-deactivate@V1 | ||
with: | ||
kube-config: ${{ secrets.KUBECONFIG }} | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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
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,57 @@ | ||
name: Indexing (prod) | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
cancel-in-progress: true | ||
group: indexing-prod | ||
|
||
jobs: | ||
index: | ||
name: Index Prod | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Yarn cache setup | ||
uses: c-hive/gha-yarn-cache@v2 | ||
with: | ||
directory: .k8s | ||
|
||
- name: Install kosko-charts dependencies | ||
shell: bash | ||
run: yarn --cwd .k8s install --frozen-lockfile --prefer-offline | ||
|
||
- name: Generate indexing job | ||
shell: bash | ||
# HACK: we use preprod to run the job on the dev cluster | ||
run: yarn --cwd .k8s --silent generate --env preprod jobs/indexing > indexing.yml | ||
env: | ||
RANCHER_PROJECT_ID: ${{ secrets.RANCHER_PROJECT_ID }} | ||
SOCIALGOUV_BASE_DOMAIN: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} | ||
|
||
- name: Archive indexing job | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: indexing.yml | ||
path: indexing.yml | ||
|
||
- name: Get namespace name | ||
uses: mikefarah/yq@master | ||
id: namespace | ||
with: | ||
cmd: yq eval ".metadata.namespace" indexing.yml | head -n 1 | ||
|
||
- name: Create kubernetes config | ||
shell: bash | ||
run: | | ||
mkdir ~/.kube | ||
touch ~/.kube/config | ||
echo ${{ secrets.KUBECONFIG }} | base64 -d > ~/.kube/config | ||
- name: Launch indexing Job | ||
shell: bash | ||
run: | | ||
kubectl apply -f indexing.yml --namespace ${{ steps.namespace.outputs.result }} |
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,75 @@ | ||
name: Production | ||
|
||
on: | ||
push: | ||
tags: | ||
- v* | ||
|
||
concurrency: | ||
group: production | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
############################################################################## | ||
## BUILD AND REGISTER DOCKER IMAGE | ||
############################################################################## | ||
register: | ||
name: Build & Register docker images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get project name | ||
run: | | ||
echo "project=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV | ||
- name: Register API | ||
uses: SocialGouv/actions/autodevops-build-register@v1 | ||
with: | ||
project: ${{ env.project }} | ||
imageName: ${{ env.project }}/search | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: ./api/Dockerfile | ||
dockercontext: ./api | ||
|
||
- name: Register Frontend (demo) | ||
uses: SocialGouv/actions/autodevops-build-register@v1 | ||
with: | ||
project: ${{ env.project }} | ||
imageName: ${{ env.project }}/front | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: ./front/Dockerfile | ||
dockercontext: ./front | ||
|
||
- name: Register Indexing | ||
uses: SocialGouv/actions/autodevops-build-register@v1 | ||
with: | ||
project: ${{ env.project }} | ||
imageName: ${{ env.project }}/index | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: ./index/Dockerfile | ||
dockercontext: ./index | ||
|
||
############################################################################## | ||
## DEPLOY PRODUCTION APPLICATION | ||
############################################################################## | ||
deploy-prod: | ||
name: Deploy production | ||
runs-on: ubuntu-latest | ||
needs: [register] | ||
environment: | ||
name: production | ||
url: https://recherche-entreprises.fabrique.social.gouv.fr | ||
steps: | ||
- name: Use k8s manifests generation | ||
uses: SocialGouv/actions/k8s-manifests@v1 | ||
with: | ||
environment: "prod" | ||
rancherId: ${{ secrets.RANCHER_PROJECT_ID }} | ||
socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} | ||
|
||
- name: Use autodevops deployment | ||
uses: SocialGouv/actions/autodevops-deploy@v1 | ||
with: | ||
environment: "prod" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
kubeconfig: ${{ secrets.KUBECONFIG }} | ||
rancherId: ${{ secrets.RANCHER_PROJECT_ID }} |
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,17 @@ | ||
name: Release | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [master, alpha, beta, next] | ||
|
||
jobs: | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: SocialGouv/actions/autodevops-release@v1 | ||
with: | ||
github-token: ${{ secrets.SOCIALGROOVYBOT_BOTO_PAT }} | ||
author-name: ${{ secrets.SOCIALGROOVYBOT_NAME }} | ||
author-email: ${{ secrets.SOCIALGROOVYBOT_EMAIL }} |
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,81 @@ | ||
name: Review | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
tags-ignore: | ||
- v* | ||
|
||
concurrency: | ||
cancel-in-progress: true | ||
group: ${{ github.ref }} | ||
|
||
jobs: | ||
############################################################################## | ||
## BUILD AND REGISTER DOCKER IMAGES | ||
############################################################################## | ||
register: | ||
name: Build & Register | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Get project name | ||
run: | | ||
echo "project=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV | ||
- name: Register API | ||
uses: SocialGouv/actions/autodevops-build-register@v1 | ||
with: | ||
project: ${{ env.project }} | ||
imageName: ${{ env.project }}/search | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: ./api/Dockerfile | ||
dockercontext: ./api | ||
|
||
- name: Register Frontend (demo) | ||
uses: SocialGouv/actions/autodevops-build-register@v1 | ||
with: | ||
project: ${{ env.project }} | ||
imageName: ${{ env.project }}/front | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: ./front/Dockerfile | ||
dockercontext: ./front | ||
|
||
- name: Register Indexing | ||
uses: SocialGouv/actions/autodevops-build-register@v1 | ||
with: | ||
project: ${{ env.project }} | ||
imageName: ${{ env.project }}/index | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
dockerfile: ./index/Dockerfile | ||
dockercontext: ./index | ||
|
||
############################################################################## | ||
## GENERATE KUBERNETES MANIFESTS | ||
############################################################################## | ||
manifests: | ||
name: Generate k8s manifests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Use k8s manifests generation | ||
uses: SocialGouv/actions/k8s-manifests@v1 | ||
with: | ||
environment: "dev" | ||
rancherId: ${{ secrets.RANCHER_PROJECT_ID }} | ||
socialgouvBaseDomain: ${{ secrets.SOCIALGOUV_BASE_DOMAIN }} | ||
|
||
############################################################################## | ||
## DEPLOY APPLICATION OVER KUBERNETES | ||
############################################################################## | ||
deploy: | ||
name: Deploy application | ||
runs-on: ubuntu-latest | ||
needs: [register, manifests] | ||
steps: | ||
- name: Use autodevops deployment | ||
uses: SocialGouv/actions/autodevops-deploy@v1 | ||
with: | ||
environment: "dev" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
kubeconfig: ${{ secrets.KUBECONFIG }} | ||
rancherId: ${{ secrets.RANCHER_PROJECT_ID }} |
Oops, something went wrong.