We're doing this via a build pipeline during master build, but could also be scheduled, and use the jsreport api to export all reports we have and publish them to an artifactory. We're using gitlab and our pipeline has following jobs. Would this be a solution?
build jsrexport:
stage: build
image:
name: <jsreport-docker-image>
script:
- echo "### BUILD JSREPORT EXPORT FILE"
# all our jsreport templates are in the folder 'templates' and it's sub folders
# the jsreport working directory is app/data in our case
- cp -r templates /app/data
- cd /app
- jsreport export $CI_PROJECT_DIR/export-full.jsrexport
artifacts:
expire_in: 3 days
paths:
- '**/export-full.jsrexport'
publish jsrexport:
stage: publish
image:
name: <some docker image with curl>
script:
- curl --fail -u ${USER}:${PASSWORD} -X PUT https://<where_we_put_it>/export-full.jsrexport -T $CI_PROJECT_DIR/export-full.jsrexport