Skip to content

xWiiLLz/azure-pipelines-from-gitlab

Repository files navigation

azure-pipelines

Triggering azure pipelines from any [Docker enabled] CI provider

oclif Version Downloads/week License

Docker

This will most likely be useful to you if you're planning to trigger azure pipelines from an external CI. In my case, this was using Gitlab's CI.

The syntax to launch the cli using docker is quite simple:

$ docker run xwiillz/azure-pipelines-runner azure-pipelines run {Your Azure DevOps Organization} {Your Azure DevOps Project} {Branch name from which you would like to trigger the CI} {Your Azure DevOps Personal Access Token} [-d some-definition-id] ...

Usage

$ npm install -g azure-pipelines-from-gitlab
$ azure-pipelines COMMAND
running command...
$ azure-pipelines (-v|--version|version)
azure-pipelines-from-gitlab/0.0.0 linux-x64 node-v12.13.0
$ azure-pipelines --help [COMMAND]
USAGE
  $ azure-pipelines COMMAND
...

Commands

azure-pipelines help [COMMAND]

display help for azure-pipelines

USAGE
  $ azure-pipelines help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

azure-pipelines run ORGANIZATION PROJECT SOURCEBRANCH PERSONALACCESSTOKEN [DEFINITIONS]

trigger one or more azure pipelines and wait for them to finish

USAGE
  $ azure-pipelines run ORGANIZATION PROJECT SOURCEBRANCH PERSONALACCESSTOKEN [DEFINITIONS]

OPTIONS
  -d, --definitions=definitions  build definition IDs to run as an array of integer. All available pipelines will be ran
                                 if nothing is provided

  -h, --help                     show CLI help

EXAMPLE
  $ azure-pipelines run myOrganization myProject master personalAccessToken
  Queuing build with definition id "2"...
  Queuing build with definition id "3"...
  Queuing build with definition id "4"...
  Queued build "Desktop CI (WPF)" (build id = 27). Waiting for it to finish... (polling)
  Queued build "Android-CI" (build id = 28). Waiting for it to finish... (polling)
  Queued build "Server CI (.NET Core)" (build id = 26). Waiting for it to finish... (polling)
  Got refreshed build status for Desktop CI (WPF). CurrentStatus: inProgress
  Got refreshed build status for Desktop CI (WPF). CurrentStatus: completed
  Build finished with result "succeeded"
  Got refreshed build status for Server CI (.NET Core). CurrentStatus: inProgress
  Got refreshed build status for Server CI (.NET Core). CurrentStatus: completed
  Build finished with result "failed"
  Got refreshed build status for Android-CI. CurrentStatus: inProgress
  Got refreshed build status for Android-CI. CurrentStatus: completed
  Build finished with result "failed"

See code: src/commands/run.ts

About

Triggering azure pipelines from gitlab

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published