mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-23 05:26:16 +01:00
add "osc service runall"
This is up for discussion, but I try to simplify the interface here: - obsolete "localrun" and "disabledrun". Still implemented, but not anymore recommended and documented. can hopefully removed later. - "runall" is running all services local, also buildtime services - files get replaced by the service - can be used to get final tar balls to be used with tools like quilt
This commit is contained in:
parent
2364a08236
commit
28c12686b9
4
NEWS
4
NEWS
@ -1,5 +1,7 @@
|
|||||||
0.155
|
0.155
|
||||||
-
|
- osc service runall: runs all service local, independend of the mode
|
||||||
|
This allows to create local files even when disabled or
|
||||||
|
just created at buildtime
|
||||||
|
|
||||||
0.154
|
0.154
|
||||||
- switch to new obs_scm service when adding git URL's
|
- switch to new obs_scm service when adding git URL's
|
||||||
|
@ -6272,8 +6272,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
run r run defined services locally, it takes an optional parameter to run only a
|
run r run defined services locally, it takes an optional parameter to run only a
|
||||||
specified source service. In case parameters exist for this one in _service file
|
specified source service. In case parameters exist for this one in _service file
|
||||||
they are used.
|
they are used.
|
||||||
localrun lr run services locally and store files as local created
|
runall ra run all services independend of the used mode
|
||||||
disabledrun dr run disabled or server side only services locally and store files as local created
|
|
||||||
remoterun rr trigger a re-run on the server side
|
remoterun rr trigger a re-run on the server side
|
||||||
merge commits all server side generated files and drops the _service definition
|
merge commits all server side generated files and drops the _service definition
|
||||||
wait waits until the service finishes and returns with an error if it failed
|
wait waits until the service finishes and returns with an error if it failed
|
||||||
@ -6303,7 +6302,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
|
|
||||||
command = args[0]
|
command = args[0]
|
||||||
|
|
||||||
if not (command in ( 'run', 'localrun', 'disabledrun', 'remoterun', 'lr', 'dr', 'r', 'rr', 'merge', 'wait' )):
|
if not (command in ( 'runall', 'ra', 'run', 'localrun', 'disabledrun', 'remoterun', 'lr', 'dr', 'r', 'rr', 'merge', 'wait' )):
|
||||||
raise oscerr.WrongArgs('Wrong command given.')
|
raise oscerr.WrongArgs('Wrong command given.')
|
||||||
|
|
||||||
if command == "remoterun" or command == "rr":
|
if command == "remoterun" or command == "rr":
|
||||||
@ -6318,7 +6317,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
print(mergeservice(apiurl, project, package))
|
print(mergeservice(apiurl, project, package))
|
||||||
return
|
return
|
||||||
|
|
||||||
if command in ('run', 'localrun', 'disabledrun', 'lr', 'dr', 'r'):
|
if command in ('runall', 'ra', 'run', 'localrun', 'disabledrun', 'lr', 'dr', 'r'):
|
||||||
if not is_package_dir(os.curdir):
|
if not is_package_dir(os.curdir):
|
||||||
raise oscerr.WrongArgs('Local directory is no package')
|
raise oscerr.WrongArgs('Local directory is no package')
|
||||||
p = Package(".")
|
p = Package(".")
|
||||||
@ -6326,6 +6325,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
mode = "local"
|
mode = "local"
|
||||||
elif command == "disabledrun" or command == "dr":
|
elif command == "disabledrun" or command == "dr":
|
||||||
mode = "disabled"
|
mode = "disabled"
|
||||||
|
elif command == "runall" or command == "ra":
|
||||||
|
mode = "all"
|
||||||
|
|
||||||
return p.run_source_services(mode, singleservice)
|
return p.run_source_services(mode, singleservice)
|
||||||
|
|
||||||
|
@ -398,6 +398,7 @@ class Serviceinfo:
|
|||||||
# recreate files
|
# recreate files
|
||||||
ret = 0
|
ret = 0
|
||||||
for service in allservices:
|
for service in allservices:
|
||||||
|
if callmode != "all":
|
||||||
if singleservice and service['name'] != singleservice:
|
if singleservice and service['name'] != singleservice:
|
||||||
continue
|
continue
|
||||||
if service['mode'] == "buildtime":
|
if service['mode'] == "buildtime":
|
||||||
@ -428,7 +429,7 @@ class Serviceinfo:
|
|||||||
# updating _services.
|
# updating _services.
|
||||||
return r
|
return r
|
||||||
|
|
||||||
if service['mode'] == "disabled" or service['mode'] == "trylocal" or service['mode'] == "localonly" or callmode == "local" or callmode == "trylocal":
|
if service['mode'] == "disabled" or service['mode'] == "trylocal" or service['mode'] == "localonly" or callmode == "local" or callmode == "trylocal" or callmode == "all":
|
||||||
for filename in os.listdir(temp_dir):
|
for filename in os.listdir(temp_dir):
|
||||||
os.rename(os.path.join(temp_dir, filename), os.path.join(dir, filename))
|
os.rename(os.path.join(temp_dir, filename), os.path.join(dir, filename))
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user