Merge pull request 'add-getgitdata' (#44) from add-getgitdata into main
Reviewed-on: #44pull/46/head
commit
663338920e
|
|
@ -6,6 +6,12 @@ All notable changes to this project will be documented in this file.
|
||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [6.2.0] - 2025-07-18
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Add endpoint for GetGitData
|
||||||
|
|
||||||
## [6.1.1] - 2025-06-26
|
## [6.1.1] - 2025-06-26
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
||||||
|
ogagent (6.2.0-1) stable; urgency=medium
|
||||||
|
|
||||||
|
* Add endpoint for GetGitData
|
||||||
|
|
||||||
|
-- OpenGnsys developers <info@opengnsys.es> Fri, 18 Jul 2025 14:10:06 +0200
|
||||||
|
|
||||||
ogagent (6.1.1-1) stable; urgency=medium
|
ogagent (6.1.1-1) stable; urgency=medium
|
||||||
|
|
||||||
* Write output of launch_browser into a file
|
* Write output of launch_browser into a file
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
6.1.1
|
6.2.0
|
||||||
|
|
|
||||||
|
|
@ -1032,3 +1032,38 @@ class ogAdmClientWorker (ogLiveWorker):
|
||||||
r.update ({ 'nfn':'RESPUESTA_KillJob', 'job':jid })
|
r.update ({ 'nfn':'RESPUESTA_KillJob', 'job':jid })
|
||||||
logger.debug (f'r aft ({r})')
|
logger.debug (f'r aft ({r})')
|
||||||
return r
|
return r
|
||||||
|
|
||||||
|
@execution_level('full')
|
||||||
|
@check_secret
|
||||||
|
def process_GetGitData (self, path, get_params, post_params, server):
|
||||||
|
logger.debug ('in process_GetGitData, path "{}" get_params "{}" post_params "{}" server "{}"'.format (path, get_params, post_params, server))
|
||||||
|
|
||||||
|
for k in ['nfn', 'dsk', 'par', 'nfn']:
|
||||||
|
if k not in post_params:
|
||||||
|
logger.error (f'required parameter ({k}) not in POST params')
|
||||||
|
return {}
|
||||||
|
|
||||||
|
tmp_gitdata = f'/tmp/gitdata-{self.IPlocal}'
|
||||||
|
nfn = post_params['nfn']
|
||||||
|
dsk = post_params['dsk']
|
||||||
|
par = post_params['par']
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.interfaceAdmin (nfn, [dsk, par, tmp_gitdata])
|
||||||
|
herror = 0
|
||||||
|
except:
|
||||||
|
herror = 1
|
||||||
|
|
||||||
|
if not os.path.exists (tmp_gitdata):
|
||||||
|
return self.respuestaEjecucionComando ({'nfn':'RESPUESTA_GetGitData'}, 1)
|
||||||
|
|
||||||
|
with open (tmp_gitdata, 'r') as fd:
|
||||||
|
gitdata = fd.read().strip()
|
||||||
|
|
||||||
|
branch, repo = gitdata.split (':')
|
||||||
|
cmd = {
|
||||||
|
'nfn': 'RESPUESTA_GetGitData',
|
||||||
|
'branch': branch,
|
||||||
|
'repo': repo,
|
||||||
|
}
|
||||||
|
return self.respuestaEjecucionComando (cmd, herror)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue