SSH Deployment With Ninja

To provide an SSH deployment of a project to the remote server using the Ninja build system follow the steps below:

 

1. Change the destination path for the deployment operation.

2. To do this, go to the root folder of the project.

3. If the custom.ninja file already exists, replace the following operational variables:

with the following scripts:

deploy_cmd = [PATH_TO_SCRIPT]/[DEPLOY_SCRIPT].sh

aot_cmd = [PATH_TO_SCRIPT]/[CACHE_CREATION_SCRIPT].sh

If it doesn't, create a new custom.ninja file and at once specify the scripts above instead of operational variables.

4. Set the LD_LIBRARY_PATH variable to use the required libraries and specify the server and location for deployment in the [DEPLOY_SCRIPT] script:

[DEPLOY_SCRIPT].sh:

export LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH

ssh username@host "mkdir -p $(dirname ${2})"

scp "$1" username@host:"$2"

5. Set LD_LIBRARY_PATH variable in the script to create object_cache.

[CACHE_CREATION_SCRIPT].sh to create release object_cache:

export LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH

ssh username@host "/opt/Querix/Lycia/bin/qrun --aot ${1}"

[CACHE_CREATION_SCRIPT].sh to create debug object_cache:

export LD_LIBRARY_PATH=/lib64:$LD_LIBRARY_PATH

ssh username@host "/opt/Querix/Lycia/bin/qrun --aot --unl ${1}"

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.