Newer
Older
In the newsletter section, the user can select an image for the monthly info. They are imported from the ecolyo assets repository but they need to be converted from `.svg` to `.png` and stored inside `mnt/image-lib` folder.
## Local setup
!!! warning "To run the following script you need to install inkscape (currently 1.3) to convert SVG to PNG. Follow the steps on the official website <https://inkscape.org/release/inkscape-1.3>"
To do so, run `./scripts/import-convert-assets.sh`
## REC/PROD setup
When email or ecogesture assets changes in Ecolyo project, you need to update them in the backoffice's server.
This step is needed to convert some svg files and all ecogestures.
- Go to the backoffice server [pipelines page](https://forge.grandlyon.com/web-et-numerique/factory/llle_project/backoffice-server/-/pipelines/new).
- Run a new pipeline for **master** branch.
!!! note "Optional"
You can specify from which Ecolyo branch you would like to get assets by overwriting _ECOLYO_ASSETS_BRANCH_ variable with a branch name (ex: 123-new-feature).
- Launch manually the job **import-convert-assets**
Once the job is finished, an artifact containing the required assets is created on GitLab.
### Import the assets on OpenShift
- Connect to the Openshift console
- Select the correct project (REC or PROD)
- Connect to the terminal of ecolyo-agent-server
- Go to the volume folder `cd /app/mnt`
- Import assets generated previously
`curl https://forge.grandlyon.com/api/v4/projects/621/jobs/artifacts/master/download?job=import-convert-assets --output image-lib.zip`
>This command fetches the latest artifact for the **import-convert-assets** job
- Extract and overwrite current assets `unzip -o image-lib.zip`
If everything is successful you can go to the assets folder to check your updated images :
- <https://ecolyo-agent-rec.apps.grandlyon.com/assets/>
- <https://ecolyo-agent.apps.grandlyon.com/assets/>