Skip to content
Snippets Groups Projects
handle_assets.md 1.55 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Handle email assets
    
    Bastien DUMONT's avatar
    Bastien DUMONT committed
    This section will allow you to import the assets used in the newsletter from Ecolyo
    
    Rémi PAILHAREY's avatar
    Rémi PAILHAREY committed
    
    ## Import assets
    
    
    When email or ecogesture assets changes in Ecolyo project, you need to update them in the backoffice's server.
    
    ### Convert the assets
    
    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 --header "PRIVATE-TOKEN:<BACKOFFICE-API-TOKEN>" 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 <https://ecolyo-agent-rec.apps.com/assets/> or <https://ecolyo-agent.apps.com/assets/> to check your updated images.