Add a new "noop" input that does nothing but forward all its data to the stage. Can be useful for testing.
35 lines
555 B
Python
Executable file
35 lines
555 B
Python
Executable file
#!/usr/bin/python3
|
|
"""
|
|
No-op inputs
|
|
|
|
Does nothing with the supplied data but just forwards
|
|
it to the stage.
|
|
"""
|
|
|
|
|
|
import json
|
|
import sys
|
|
|
|
from osbuild.objectstore import StoreClient
|
|
|
|
|
|
SCHEMA = """
|
|
"additionalProperties": true
|
|
"""
|
|
|
|
|
|
def main():
|
|
args = json.load(sys.stdin)
|
|
refs = args["refs"]
|
|
|
|
store = StoreClient(connect_to=args["api"]["store"])
|
|
|
|
path = store.mkdtemp(prefix="empty")
|
|
data = {"path": path, "data": {"refs": refs}}
|
|
json.dump(data, sys.stdout)
|
|
return 0
|
|
|
|
|
|
if __name__ == '__main__':
|
|
r = main()
|
|
sys.exit(r)
|