DEV Community


Run AzureDevops builds from command line

melezhik profile image Alexey Melezhik ・1 min read

If you prefer command line, AzureDevops comes with vsts cli allow you to execute many VSTS related operations through the command line. However you still need extra bash coding to make it run smoothly. Why bother? Choose vsts-build instead!

$ cat .sparrowdo/run-build.pl6
task-run "run build", "vsts-build", %(
  definition => 'Backend01'

$ sparrowdo --no_sudo --local_mode --sparrowfile=.sparrowdo/run-build.pl6
user: root
found ini file: /root/sparrowdo.ini
index update: False
running sparrow tasks on ...
target OS is - centos7
push [task] run build [plg] vsts-build OK
SPL file /opt/sparrow/sparrow.list is empty
set up task box file - /home/root/.sparrowdo//opt/sparrow/task-box.json - OK
sparrow root: [/opt/sparrow]
plugin /opt/sparrow/plugins/public/vsts-build/ installed locally, nothing to do here ...
running task box from /opt/sparrow/sparrow-cache/task-box.json ...
2018-12-12 13:02:44 : [task] run build [plg] vsts-build [hook]
2018-12-12 13:02:44 : [task] run build [plg] vsts-build [path] /modules/run/
vsts build queue --definition-name Backend01 --branch refs/heads/poc/storage-account
    ID       Number  Status      Result      Definition ID  Definition Name    Source Branch        Queued Time                 Reason
------  -----------  ----------  --------  ---------------  -----------------  -------------------  --------------------------  --------
219604  2.01812e+07  notStarted                       1240  Backend01           feature/storage-account  2018-12-12 13:02:45.551673  manual
ok      scenario succeeded

Discussion (0)

Editor guide