Skip to content
Snippets Groups Projects
deploy.md 1.91 KiB
Newer Older
  • Learn to ignore specific revisions
  • # Deploy
    
    This section will show you how to deploy your project on different environments.
    
    ## Deploy build to builds branches
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    3 builds branch are today available for Ecolyo:
    
    - **build**: reflect the build of the master branch and the version deployed in production environment
    - **build-dev**: reflect the build of the dev branch and the version deployed on dev environment
    - **build-test**: reflect a temporary build which can be used for test purpose
    
    !!! info "Windows users"
        Some command did not run on Windows. Please use your Linux distribution installed on your WSL. For more information about it see the [Install WSL section](../getting_started/setup_your_environment.md)
    
    Make sure that:  
    
    - you are on the right branch (dev or master) depending on the enviroment you need to deploy.
    - your branch is up to date
    - you node modules are up to date
    
    First build the application :
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ```
    
    $ yarn build
    
    Next you can deploy the build to the target branch:
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    # deploy on build-test branch
    
    $ yarn deploy-test
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    # deploy on build-dev branch
    
    $ yarn deploy-dev
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    # deploy on build branch
    
    $ yarn deploy
    
    ## Deploy build-dev branch to Scaleway
    
    You can directly use the content of build-dev branch to update apps on dev environment using scripts (from the server).
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    For more informations you can check for [Easy Cozy scripts](../../../easycozy/scripts/).
    
    ## Deploy build branch to Cozy
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    You can deploy content of build branch into Cozy registry by using the cozy-app-publish command after replacing following value:
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    
    
    Yoan VALLET's avatar
    Yoan VALLET committed
    - $REGISTRY_TOKEN : token provided by Cozy team
    - $VERSION_NUMBER: version of the application
    - $COZY_SPACE: space of the Cozy 
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    
    ```
    
    $ yarn cozy-app-publish --token $REGISTRY_TOKEN --build-url https://forge.grandlyon.com/web-et-numerique/llle_project/ecolyo/-/archive/build/ecolyo-build.tar.gz --manual-version $VERSION_NUMBER --space $COZY_SPACE
    
    Guilhem CARRON's avatar
    Guilhem CARRON committed
    ```
    
    Hugo NOUTS's avatar
    Hugo NOUTS committed
    
    
    More information at [cozy-app-publish/](https://docs.cozy.io/en/cozy-app-publish/)