software/theia: add `jq` as a dependency
Abstract: this MR is a first step towards being able to use Bash scripts in order to automate slapos
.
Context of the MR
As of today, SlapOS returns JSON when some commands get executed (request
) being one of them.
It would be nice to be able to parse this JSON and reinject it into other commands.
An example of what could be done is automating the frontend request when instantiating ERP5, using something like:
IPV6=$(slapos request --state started --parameters-file ~/srv/project/request-parameter-slaposmaster.json slaposmaster ~/srv/project/slapos/software/slapos-master/software.cfg | jq [PARAMETERS])
slapos request --type custom-personal --slave slaposmasterfrontend http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg --parameters 'type=zope' 'url=https://$IPV6:2152'
Getting this will require at least changes in slapos
and in slapos.core
.
Description of the MR
This MR is the slapos
part of the proposed change, and does very little: it allows to use jq
inside Theia.
The current repository already had a component/jq
directory, so I simply:
- updated that component to the latest version of
jq
; - updated the required dependency (
oniguruma
); - added the
jq
component as a dependency totheia
.
By deploying the slapos
repository containing this change, you should therefore be able to run jq --version
inside the Theia terminal.