Skip to content

Commit

Permalink
Merge branch 'test' into fix/style_modal_edition_parcelle
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoireDucharme authored Jan 20, 2025
2 parents 60f7c3f + 6302b4f commit db7014a
Show file tree
Hide file tree
Showing 31 changed files with 728 additions and 316 deletions.
112 changes: 56 additions & 56 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,72 +4,72 @@ on:
workflow_dispatch:
push:
tags:
- "v2.*"
- "v2.*"
paths-ignore:
- 'docs/**'
- 'CHANGELOG.md'
- 'bin/**'
- 'infrastructure/**'
- '*.example'
- 'netlify.toml'
- '*.md'
- "docs/**"
- "CHANGELOG.md"
- "bin/**"
- "infrastructure/**"
- "*.example"
- "netlify.toml"
- "*.md"

jobs:
build:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"

- name: Assign env variables to a .env file
run: env | grep VUE_APP > .env.local
env:
VUE_APP_MATOMO_SITE_ID: 10
VUE_APP_API_ENDPOINT: "https://cartobio.agencebio.org/api"
VUE_APP_PRELOADED_CAMPAGNE_PAC: 2023
VUE_APP_PRODUCTION: true
VUE_APP_ENVIRONMENT: production
VUE_APP_SENTRY_DSN: ${{ secrets.VUE_APP_SENTRY_DSN }}
- name: Assign env variables to a .env file
run: env | grep VUE_APP > .env.local
env:
VUE_APP_MATOMO_SITE_ID: 10
VUE_APP_API_ENDPOINT: "https://cartobio.agencebio.org/api"
VUE_APP_PRELOADED_CAMPAGNE_PAC: 2023
VUE_APP_PRODUCTION: true
VUE_APP_ENVIRONMENT: production
VUE_APP_SENTRY_DSN: ${{ secrets.VUE_APP_SENTRY_DSN }}

- run: npm clean-install-test
- run: |
npm run build:app
npm run build:widget -- --base "https://cartobio.agencebio.org/notification-webcomponent/"
- run: npm clean-install-test
- run: |
npm run build:app
npm run build:widget -- --base "https://cartobio.agencebio.org/notification-webcomponent/"
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.AGENCEBIO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.AGENCEBIO_SSH_KNOWN_HOSTS }}
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.AGENCEBIO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.AGENCEBIO_SSH_KNOWN_HOSTS }}

- name: rsync
run: |
rsync -avzr --delete --exclude 'node_modules' --exclude '.git*' ./dist/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
env:
REMOTE_HOST: ${{ secrets.AGENCEBIO_SSH_HOST }}
REMOTE_USER: ${{ secrets.AGENCEBIO_SSH_USERNAME }}
REMOTE_PATH: /var/www/cartobio.agencebio.org/
- name: rsync
run: |
rsync -avzr --delete --exclude 'node_modules' --exclude '.git*' ./dist/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
env:
REMOTE_HOST: ${{ secrets.AGENCEBIO_SSH_HOST }}
REMOTE_USER: ${{ secrets.AGENCEBIO_SSH_USERNAME }}
REMOTE_PATH: /var/www/cartobio.agencebio.org/

- id: version
run: echo v=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT"
- id: version
run: echo v=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT"

- name: Create Sentry production release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: betagouv
SENTRY_PROJECT: cartobio-front
SENTRY_URL: https://sentry.incubateur.net/
SENTRY_LOG_LEVEL: debug
with:
environment: production
# On a pas l'intégration GitHub qui permet que Sentry récupère dans
# l'autre sens les commits liés à la release, donc on skip
set_commits: skip
# Permet d'avoir le nom de la version sans le v
version: "${{ steps.version.outputs.v }}"
sourcemaps: dist/assets/
# - name: Create Sentry production release
# uses: getsentry/action-release@v1
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: betagouv
# SENTRY_PROJECT: cartobio-front
# SENTRY_URL: https://sentry.incubateur.net/
# SENTRY_LOG_LEVEL: debug
# with:
# environment: production
# # On a pas l'intégration GitHub qui permet que Sentry récupère dans
# # l'autre sens les commits liés à la release, donc on skip
# set_commits: skip
# # Permet d'avoir le nom de la version sans le v
# version: "${{ steps.version.outputs.v }}"
# sourcemaps: dist/assets/
116 changes: 58 additions & 58 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,74 +3,74 @@ name: Build and deploy (staging)
on:
push:
branches:
- "v2"
- "v2"
paths-ignore:
- 'docs/**'
- 'CHANGELOG.md'
- 'bin/**'
- 'infrastructure/**'
- '*.example'
- 'netlify.toml'
- '*.md'
- "docs/**"
- "CHANGELOG.md"
- "bin/**"
- "infrastructure/**"
- "*.example"
- "netlify.toml"
- "*.md"

jobs:
deploy:
runs-on: ubuntu-latest
environment: staging
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"

- name: Assign env variables to a .env file
run: env | grep VUE_APP > .env.local
env:
VUE_APP_MATOMO_SITE_ID: 11
VUE_APP_API_ENDPOINT: "https://cartobio-preprod.agencebio.org/api"
VUE_APP_PRELOADED_CAMPAGNE_PAC: 2023
VUE_APP_ENVIRONMENT: staging
VUE_APP_SENTRY_DSN: ${{ secrets.VUE_APP_SENTRY_DSN }}
VUE_APP_GIT_COMMIT_SHA: ${{ github.sha }}
- name: Assign env variables to a .env file
run: env | grep VUE_APP > .env.local
env:
VUE_APP_MATOMO_SITE_ID: 11
VUE_APP_API_ENDPOINT: "https://cartobio-preprod.agencebio.org/api"
VUE_APP_PRELOADED_CAMPAGNE_PAC: 2023
VUE_APP_ENVIRONMENT: staging
VUE_APP_SENTRY_DSN: ${{ secrets.VUE_APP_SENTRY_DSN }}
VUE_APP_GIT_COMMIT_SHA: ${{ github.sha }}

- run: npm clean-install-test
- run: |
npm run build:app
npm run build:widget -- --base "https://cartobio-preprod.agencebio.org/notification-webcomponent/"
npm run build:widget-demo -- --base "https://cartobio-preprod.agencebio.org/notification-webcomponent/"
- run: npm clean-install-test
- run: |
npm run build:app
npm run build:widget -- --base "https://cartobio-preprod.agencebio.org/notification-webcomponent/"
npm run build:widget-demo -- --base "https://cartobio-preprod.agencebio.org/notification-webcomponent/"
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.AGENCEBIO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.AGENCEBIO_PREPROD_SSH_KNOWN_HOSTS }}
- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.AGENCEBIO_SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.AGENCEBIO_PREPROD_SSH_KNOWN_HOSTS }}

- name: rsync
run: |
rsync -avzr --delete --exclude 'node_modules' --exclude '.git*' ./dist/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
env:
REMOTE_HOST: ${{ secrets.AGENCEBIO_PREPROD_SSH_HOST }}
REMOTE_USER: ${{ secrets.AGENCEBIO_SSH_USERNAME }}
REMOTE_PATH: /var/www/cartobio-preprod.agencebio.org/
- name: rsync
run: |
rsync -avzr --delete --exclude 'node_modules' --exclude '.git*' ./dist/ ${REMOTE_USER}@${REMOTE_HOST}:${REMOTE_PATH}
env:
REMOTE_HOST: ${{ secrets.AGENCEBIO_PREPROD_SSH_HOST }}
REMOTE_USER: ${{ secrets.AGENCEBIO_SSH_USERNAME }}
REMOTE_PATH: /var/www/cartobio-preprod.agencebio.org/

- id: version
run: echo v=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT"
- id: version
run: echo v=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT"

- name: Create Sentry staging release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: betagouv
SENTRY_PROJECT: cartobio-front
SENTRY_URL: https://sentry.incubateur.net/
with:
environment: staging
sourcemaps: dist/assets/
# On a pas l'intégration GitHub qui permet que Sentry récupère dans
# l'autre sens les commits liés à la release, donc on skip
set_commits: skip
# Permet d'avoir le nom de la dernière release de prod
# dans le nom affiché sur Sentry tout en gardant un
# identifiant unique à ce commit
version: "${{ steps.version.outputs.v }}-dev-${{ github.sha }}"
# - name: Create Sentry staging release
# uses: getsentry/action-release@v1
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: betagouv
# SENTRY_PROJECT: cartobio-front
# SENTRY_URL: https://sentry.incubateur.net/
# with:
# environment: staging
# sourcemaps: dist/assets/
# # On a pas l'intégration GitHub qui permet que Sentry récupère dans
# # l'autre sens les commits liés à la release, donc on skip
# set_commits: skip
# # Permet d'avoir le nom de la dernière release de prod
# # dans le nom affiché sur Sentry tout en gardant un
# # identifiant unique à ce commit
# version: "${{ steps.version.outputs.v }}-dev-${{ github.sha }}"
52 changes: 26 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
branches:
- "test"
paths-ignore:
- 'docs/**'
- 'CHANGELOG.md'
- 'bin/**'
- 'infrastructure/**'
- '*.example'
- 'netlify.toml'
- '*.md'
- "docs/**"
- "CHANGELOG.md"
- "bin/**"
- "infrastructure/**"
- "*.example"
- "netlify.toml"
- "*.md"

jobs:
deploy:
Expand All @@ -24,8 +24,8 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
node-version-file: ".nvmrc"
cache: "npm"

- name: Assign env variables to a .env file
run: env | grep VUE_APP > .env.local
Expand Down Expand Up @@ -58,20 +58,20 @@ jobs:
- id: version
run: echo v=$(node -p "require('./package.json').version") >> "$GITHUB_OUTPUT"

- name: Create Sentry ${{ env.DEPLOY_ENV }} release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: betagouv
SENTRY_PROJECT: cartobio-front
SENTRY_URL: https://sentry.incubateur.net/
with:
environment: test
sourcemaps: dist/assets/
# On a pas l'intégration GitHub qui permet que Sentry récupère dans
# l'autre sens les commits liés à la release, donc on skip
set_commits: skip
# Permet d'avoir le nom de la dernière release de prod
# dans le nom affiché sur Sentry tout en gardant un
# identifiant unique à ce commit
version: "${{ steps.version.outputs.v }}-dev-${{ github.sha }}"
# - name: Create Sentry ${{ env.DEPLOY_ENV }} release
# uses: getsentry/action-release@v1
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: betagouv
# SENTRY_PROJECT: cartobio-front
# SENTRY_URL: https://sentry.incubateur.net/
# with:
# environment: test
# sourcemaps: dist/assets/
# # On a pas l'intégration GitHub qui permet que Sentry récupère dans
# # l'autre sens les commits liés à la release, donc on skip
# set_commits: skip
# # Permet d'avoir le nom de la dernière release de prod
# # dans le nom affiché sur Sentry tout en gardant un
# # identifiant unique à ce commit
# version: "${{ steps.version.outputs.v }}-dev-${{ github.sha }}"
Loading

0 comments on commit db7014a

Please sign in to comment.