Reputation: 2339
the command:
doit -f ./srvapp/doit-build.py build --stype $argc_type --zone $argc_zone
the DAG
def task_build():
"""build"""
def python_build(stype, zone):
print(f"TYPE: {stype}, ZONE: {zone}")
return {
'actions': [python_build],
'verbosity':2,
'params':[
{'name':'zone', 'default': 'BLANKZONE'},
{'name':'stype', 'default': 'BLANKSTYPE'}
]
}
the result:
TYPE: email-sifter
ZONE: uat
ACTION: build
ERROR: Error parsing Task: option --stype not recognized (parsing options: [CmdOption({'name':'zone', 'short':'','long':'' }), CmdOption({'name':'stype', 'short':'','long':'' })]). Got: ['--stype', 'email-sifter', '--zone', 'uat']
Not sure why its telling me style not recognized?
Following doc from here: https://pydoit.org/task-args.html#task-action-parameters
Upvotes: 0
Views: 28