Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/openupm/openupm-pipelines
Azure Build Pipelines for OpenUPM
https://github.com/openupm/openupm-pipelines
hacktoberfest openupm
Last synced: 4 days ago
JSON representation
Azure Build Pipelines for OpenUPM
- Host: GitHub
- URL: https://github.com/openupm/openupm-pipelines
- Owner: openupm
- License: mit
- Created: 2019-07-24T15:41:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-05-18T06:27:16.000Z (6 months ago)
- Last Synced: 2024-08-04T02:10:41.087Z (3 months ago)
- Topics: hacktoberfest, openupm
- Language: JavaScript
- Homepage: https://openupm.com
- Size: 142 KB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Azure Pipelines for OpenUPM
A customized proxy builder to build and publish upm package using `Azure Pipelines`.
## Prepare Azura
Prepare a service connection
- Visit https://dev.azure.com/openupm/openupm
- Project settings > Service connections > New service connection > npm
- Connection name, `openupm`
- Registry URL, `https://package.openupm.com`
- Personal Token...## 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](https://github.com/lextm/vstsabort).
Api reference: [azure-devops-rest-5.1](https://docs.microsoft.com/en-us/rest/api/azure/devops/build/builds/queue?view=azure-devops-rest-5.1).
```bash
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](https://stackoverflow.com/questions/34343084/start-a-build-and-passing-variables-through-vsts-rest-api/36339920#36339920).
## Build with azure-devops-node-api
https://github.com/Microsoft/azure-devops-node-api
```javascript
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