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

Met à jour les noms du dépot Github, des apps Scalingo etc #3458

Merged
merged 6 commits into from
May 28, 2024
Merged
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
14 changes: 6 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ orbs:

defaults:
&defaults
working_directory: ~/place-des-entreprises
working_directory: ~/conseillers-entreprises
docker:
- image: cimg/ruby:3.1.2-browsers
- image: cimg/redis:7.2.3
- image: cimg/postgres:14.10
environment:
POSTGRES_USER: place_des_entreprises_test
POSTGRES_PASSWORD: place_des_entreprises_test
POSTGRES_DB: place_des_entreprises_test
POSTGRES_USER: conseillers_entreprises_test
POSTGRES_PASSWORD: conseillers_entreprises_test
POSTGRES_DB: conseillers_entreprises_test
CC_TEST_REPORTER_ID: $CC_TEST_REPORTER_ID

bundle_restore_cache:
Expand Down Expand Up @@ -82,15 +82,13 @@ jobs:
chmod +x ./tmp/cc-test-reporter
- run:
environment:
DATABASE_URL: "postgres://place_des_entreprises_test@localhost:5432/place_des_e\
ntreprises_test"
DATABASE_URL: "postgres://conseillers_entreprises_test@localhost:5432/conseillers_entreprises_test"
RORVSWILD_KEY: 'rorvswild'
name: Create DB
command: bundle exec rake db:create db:schema:load db:migrate RAILS_ENV=test
- run:
environment:
DATABASE_URL: "postgres://place_des_entreprises_test@localhost:5432/place_des_e\
ntreprises_test"
DATABASE_URL: "postgres://conseillers_entreprises_test@localhost:5432/conseillers_entreprises_test"
APPLICATION_EMAIL: "[email protected]"
APPLICATION_MARKETING_EMAIL: "[email protected]"
TEST_ERROR_RENDERING: "false"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Conseillers-entreprises.service-public.fr

[![CircleCI](https://dl.circleci.com/status-badge/img/gh/betagouv/place-des-entreprises/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/betagouv/place-des-entreprises/tree/main) [![Maintainability](https://api.codeclimate.com/v1/badges/12cdf35ab56d27c64046/maintainability)](https://codeclimate.com/github/betagouv/place-des-entreprises/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/12cdf35ab56d27c64046/test_coverage)](https://codeclimate.com/github/betagouv/place-des-entreprises/test_coverage)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/betagouv/conseillers-entreprises/tree/main.svg?style=svg)](https://dl.circleci.com/status-badge/redirect/gh/betagouv/conseillers-entreprises/tree/main) [![Maintainability](https://api.codeclimate.com/v1/badges/0aac54cabd32aa282dc5/maintainability)](https://codeclimate.com/github/betagouv/conseillers-entreprises/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/0aac54cabd32aa282dc5/test_coverage)](https://codeclimate.com/github/betagouv/conseillers-entreprises/test_coverage)

# Conseillers-Entreprises

Expand Down
2 changes: 1 addition & 1 deletion app/views/about/accessibilite.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<li>CSS</li>
<li>Javascript</li>
</ul>
<% url="https://github.com/betagouv/place-des-entreprises" %>
<% url="https://github.com/betagouv/conseillers-entreprises" %>
<p>Lien vers le code source : <a href="<%= url %>" title="<%= to_new_window_title(url)%>" target="_blank" rel='noopener'><%= url %></a></p>

<h4>Environnement de test</h4>
Expand Down
2 changes: 1 addition & 1 deletion app/views/pages/_footer.haml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
%li
= link_to t('.service_presentation'), '/dossier-presse.pdf', title: t('.service_presentation_title'), download: "true", rel: 'noopener', class: 'fr-footer__top-link'
%li
= link_to t('.source_code'), 'https://github.com/betagouv/place-des-entreprises', title: to_new_window_title(t('.github_title')), target: '_blank', rel: 'noopener', class: 'fr-footer__top-link'
= link_to t('.source_code'), 'https://github.com/betagouv/conseillers-entreprises', title: to_new_window_title(t('.github_title')), target: '_blank', rel: 'noopener', class: 'fr-footer__top-link'
%li
= link_to t('usage_stats'), public_index_path, class: 'fr-footer__top-link'
- if policy(Stats::All).team?
Expand Down
4 changes: 2 additions & 2 deletions doc/01-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

1. Clone the repository.

$ git clone [email protected]:betagouv/place-des-entreprises.git
$ cd place-des-entreprises
$ git clone [email protected]:betagouv/conseillers-entreprises.git
$ cd conseillers-entreprises

2. Install Ruby using **rbenv**. See `.ruby-version` file to know which Ruby version is needed.

Expand Down
2 changes: 1 addition & 1 deletion doc/02-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ COVERAGE=true bundle exec rspec
## Automated tests and Continuous integration

* Circle CI is hooked on github pull requests. It runs `rake test` and `rake lint`. The CI only runs for pull requests, not for all pushed branches.
* Code merged on `main` is automatically deployed on `reso-staging` (See [Deployment](03-deployment.md).)
* Code merged on `main` is automatically deployed on `ce-staging` (See [Deployment](03-deployment.md).)

The Circle CI account is shared with the other betagouv startups; it’s paid for by the DINUM.

Expand Down
26 changes: 13 additions & 13 deletions doc/03-deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@

## Domain name

The `beta.gouv.fr` is registered on OVH by the DINUM, the `place-des-entreprises` subdomain is delegated to the team on AlwaysData. This allows us to manage TXT records ourselves and to add additional sub-subdomains. Contact the developer team to access the AlwaysData account.
The `service-public.fr` is registered on NAMESHIELD by the DILA, the `conseillers-entreprises` subdomain is delegated to the team on OVH. This allows us to manage TXT records ourselves and to add additional sub-subdomains. Contact the developer team to access the OVH account.

## Branches and setup

Conseillers-entreprises.service-public.fr is deployed on [Scalingo](http://doc.scalingo.com/languages/ruby/getting-started-with-rails/), with two distinct environment, `reso-staging` and `reso-production.` (Reso is an old name of the project.)
Conseillers-entreprises.service-public.fr is deployed on [Scalingo](http://doc.scalingo.com/languages/ruby/getting-started-with-rails/), with two distinct environment, `ce-staging` and `ce-production.`

* `reso-staging` is served at https://reso-staging.scalingo.io.
* `reso-production` is the actual https://conseillers-entreprises.service-public.fr
* `ce-staging` is served at https://ce-staging.scalingo.io.
* `ce-production` is the actual https://conseillers-entreprises.service-public.fr

There are GitHub to Scalingo hooks setup for auto-deployment:
* The `main` branch is automatically deployed to the `reso-staging` env.
* The `production` branch is automatically deployed to the `reso-production` env.
* The `main` branch is automatically deployed to the `ce-staging` env.
* The `production` branch is automatically deployed to the `ce-production` env.

Additionally, a `postdeploy` hook [is setup in the Procfile](https://doc.scalingo.com/platform/app/postdeploy-hook#applying-migrations) so that Rails migrations are run automatically.

In case of emergency, you can always run the rails console in production using the `scalingo` command line tool.

$ scalingo -a reso-staging run rails c
$ scalingo -a reso-production run rails c
$ scalingo -a ce-staging run rails c
$ scalingo -a ce-production run rails c

## HSTS

Expand All @@ -43,11 +43,11 @@ Updating main and production…
Last production commit is ebe7d79c4149c3ae64af917e0ccd09bb7c473cc8
About to merge 5 PRs and push to production:
🚀
* [#718](https://github.com/betagouv/place-des-entreprises/pull/718) display created_at date instead of visit date
* [#720](https://github.com/betagouv/place-des-entreprises/pull/720) Bump rack from 2.0.7 to 2.0.8
* [#714](https://github.com/betagouv/place-des-entreprises/pull/714) Do not cc everyone in UserMailer#match_feedback
* [#710](https://github.com/betagouv/place-des-entreprises/pull/710) Send a distinct email to the advisor when sending notifications
* [#713](https://github.com/betagouv/place-des-entreprises/pull/713) Redesign email css
* [#718](https://github.com/betagouv/conseillers-entreprises/pull/718) display created_at date instead of visit date
* [#720](https://github.com/betagouv/conseillers-entreprises/pull/720) Bump rack from 2.0.7 to 2.0.8
* [#714](https://github.com/betagouv/conseillers-entreprises/pull/714) Do not cc everyone in UserMailer#match_feedback
* [#710](https://github.com/betagouv/conseillers-entreprises/pull/710) Send a distinct email to the advisor when sending notifications
* [#713](https://github.com/betagouv/conseillers-entreprises/pull/713) Redesign email css
Proceed?
```

Expand Down
4 changes: 2 additions & 2 deletions doc/04-architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@ Conseillers-entreprises.service-public.fr est une application web écrite en [Ru

### Développement

Le développement de Conseillers-Entreprises est organisé sur [github](https://github.com/betagouv/place-des-entreprises).
Le développement de Conseillers-Entreprises est organisé sur [github](https://github.com/betagouv/conseillers-entreprises).
* Le code source est libre et ouvert, et publié sour license AGPL.
* Le développement se fait de façon transparente ; les _issues_ et _pull requests_ sont visibles par tout le monde.

L’app Ruby est développée principalement sous forme de « [monolithe](https://m.signalvnoise.com/the-majestic-monolith/) ». Il y a très peu de javascript. De manière générale, Conseillers-Entreprises est développée de façon _prudente_: nous utilisons, autant que possible, des technologies qui ont fait leur preuve, et qui sont mises à jour régulièrement.

Nous travaillons de façon agile, par sprints de deux semaines. Le développement logiciel est fait en concertation permanente avec les autres membres de l’équipe. Un aperçu des sujets en cours est visible [directement sur github](https://github.com/betagouv/place-des-entreprises/projects/1).
Nous travaillons de façon agile, par sprints de deux semaines. Le développement logiciel est fait en concertation permanente avec les autres membres de l’équipe. Un aperçu des sujets en cours est visible [directement sur github](https://github.com/orgs/betagouv/projects/96).

Nous utilisons les outils standard d’audit automatique de qualité de code ([rubocop](https://rubocop.org)) et de sécurité ([brakeman](https://brakemanscanner.org)). Par ailleurs, nous développons, en parallèle des fonctionnalités, les tests associés. Ces tests sont executés de façon automatique avant l’intégration de chaque changement dans le code. Nous utilisons [Circle-CI](https://circleci.com) pour faire tourner ces tests automatiques.

Expand Down
4 changes: 2 additions & 2 deletions lib/tasks/import_dump.rake
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace :import_dump do
def setup_tunnel
tunnel_command = 'scalingo -a reso-production db-tunnel SCALINGO_POSTGRESQL_URL'
tunnel_command = 'scalingo -a ce-production db-tunnel SCALINGO_POSTGRESQL_URL'
@tunnel_pid = fork{ exec tunnel_command }
end

Expand All @@ -13,7 +13,7 @@ namespace :import_dump do

sleep 2

env = `scalingo -a reso-production env`.lines
env = `scalingo -a ce-production env`.lines
pg_url = env.find{ |i| i[/SCALINGO_POSTGRESQL_URL=/] }
pw = pg_url[/.*:(.*)@/,1]
dbname = 'reso_produc_4107'
Expand Down
8 changes: 4 additions & 4 deletions lib/tasks/import_prod_to_staging.rake
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace :import_prod_to_staging do
end

def setup_prod_tunnel
tunnel_command = 'scalingo -a reso-production db-tunnel SCALINGO_POSTGRESQL_URL'
tunnel_command = 'scalingo -a ce-production db-tunnel SCALINGO_POSTGRESQL_URL'
@prod_tunnel_pid = fork{ exec tunnel_command }
end

Expand All @@ -22,7 +22,7 @@ namespace :import_prod_to_staging do
end

def setup_staging_tunnel
tunnel_command = 'scalingo -a reso-staging db-tunnel SCALINGO_POSTGRESQL_URL'
tunnel_command = 'scalingo -a ce-staging db-tunnel SCALINGO_POSTGRESQL_URL'
@staging_tunnel_pid = fork{ exec tunnel_command }
end

Expand All @@ -35,7 +35,7 @@ namespace :import_prod_to_staging do

sleep 2

env = `scalingo -a reso-production env`.lines
env = `scalingo -a ce-production env`.lines
pg_url = env.find{ |i| i[/SCALINGO_POSTGRESQL_URL=/] }
pw = pg_url[/.*:(.*)@/,1]
username = pg_url[/\/\/(.*):.*@/,1]
Expand All @@ -52,7 +52,7 @@ namespace :import_prod_to_staging do

sleep 2

env = `scalingo -a reso-staging env`.lines
env = `scalingo -a ce-staging env`.lines
pg_url = env.find{ |i| i[/SCALINGO_POSTGRESQL_URL=/] }
pw = pg_url[/.*:(.*)@/,1]
username = pg_url[/\/\/(.*):.*@/,1]
Expand Down
2 changes: 1 addition & 1 deletion lib/tasks/push_to_production.rake
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ task :push_to_production do
end

def format_parts(parts)
pull_request_url = 'https://github.com/betagouv/place-des-entreprises/pull/'
pull_request_url = 'https://github.com/betagouv/conseillers-entreprises/pull/'
"* [##{parts['pr']}](#{pull_request_url}#{parts['pr']}) #{parts['title'].strip}"
end

Expand Down
2 changes: 1 addition & 1 deletion spec/swagger_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
url: 'https://conseillers-entreprises.service-public.fr',
},
{
url: 'https://reso-staging.osc-fr1.scalingo.io',
url: 'https://ce-staging.osc-fr1.scalingo.io',
},
],
components: {
Expand Down
2 changes: 1 addition & 1 deletion swagger/v1/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ paths:
required: true
servers:
- url: https://conseillers-entreprises.service-public.fr
- url: https://reso-staging.osc-fr1.scalingo.io
- url: https://ce-staging.osc-fr1.scalingo.io
components:
schemas:
landing:
Expand Down