gem / oq-engine

OpenQuake Engine: a software for Seismic Hazard and Risk Analysis
https://github.com/gem/oq-engine/#openquake-engine
GNU Affero General Public License v3.0
383 stars 277 forks source link

AELO project: write a script exporting the mosaic repository into a directory #8343

Closed micheles closed 1 year ago

micheles commented 1 year ago

There are two ways, one exporting from the cloned repositories and one exporting from gitlab by using a gitlab token. Both are needed. While trivial in theory, this will be hard due to the number and the size of the repositories. NB: the script must live in https://gitlab.openquake.org/hazard/mosaic/mosaic, not in the engine.

The following code can be useful:

auth = {'Authorization': 'PRIVATE-TOKEN ' + token}
resp = requests.get('https://gitlab.openquake.org/hazard/mosaic/ALS/-/blob/master/in/job.ini',
                    headers=auth)
print(resp.content)
micheles commented 1 year ago

This is too hard to maintain (30 repositories require 30 access codes that expire all the time). Abandoned. Instead store somewhere a jobs.zip file so that it can be downloaded by the GitLab action.