Skip to content

openupm/openupm-pipelines

Repository files navigation

Azure Pipelines for OpenUPM

A customized proxy builder to build and publish upm package using Azure Pipelines.

Prepare Azura

Prepare a service connection

Build with REST API

Required variables

{
    repo_url: 'https://...',
    repo_branch: 'master',
    package_name: 'com.yourcompany.package...'
}

If no variables are provided, the build will be abort as failed.

Api reference: azure-devops-rest-5.1.

http --ignore-stdin \
  -v \
  -a username:token \
  post https://dev.azure.com/openupm/openupm/_apis/build/builds?api-version=5.1 \
  definition:='{ "id": 1 }' \
  parameters:='"{ \"repo_url\": \"https://...\", ... }"'

The parameters argument is a stringified dictionary.

Build with azure-devops-node-api

https://github.com/Microsoft/azure-devops-node-api

const azureDevops = require("azure-devops-node-api");

const token = '';
const endpoint = 'https://dev.azure.com/openupm';
const definitionId = 1;
const project = 'openupm';

const buildPipelines = async function () {
  let authHandler = azureDevops.getPersonalAccessTokenHandler(token);
  let conn = new azureDevops.WebApi(endpoint, authHandler);
  var buildApi = await conn.getBuildApi();
  let build = await buildApi.queueBuild({
    definition: {
      id: definitionId
    },
    parameters:
      JSON.stringify(
        {
          repo_url: 'https://...',
          ...
        }
      )
  }, project);
  cconsole.log(build);
};

Contributors

Favo Yang
Favo Yang

💻 🚧
Pavel
Pavel "am1goo" Shestakov

💻
James Frowen
James Frowen

🐛

About

Azure Build Pipelines for OpenUPM

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •