implement CLI
This commit is contained in:
16
glcifinder-cli.py
Normal file
16
glcifinder-cli.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import click
|
||||
|
||||
import gitlab_api_finder
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("--count", default=1, help="Number of jobs to search.")
|
||||
@click.option("--projectid", prompt="Id of Gitlab Project", help="Id of Gitlab Project.")
|
||||
@click.option("--jobname", prompt="name of job to filter", help="Id of Gitlab Project.")
|
||||
def hello(count, projectid, jobname):
|
||||
gitlab_api_finder.find_jobs(count, projectid, jobname)
|
||||
|
||||
|
||||
# example usage: python glcifinder-cli.py --count 1000 --projectid 244 --jobname deploy-test
|
||||
if __name__ == '__main__':
|
||||
hello()
|
||||
Reference in New Issue
Block a user