GithubHelp home page GithubHelp logo

classicvalues / get-azure-pipelines-artifact Goto Github PK

View Code? Open in Web Editor NEW

This project forked from git-for-windows/get-azure-pipelines-artifact

1.0 1.0 0.0 3.38 MB

A GitHub Action that downloads and caches the specified artifact from a given Azure Pipeline

License: MIT License

TypeScript 91.85% JavaScript 1.16% Shell 6.99%

get-azure-pipelines-artifact's Introduction

Download an artifact from an Azure Pipeline

Use this Action to download an artifact from an Azure Pipeline.

Getting Started

name: Download stuff from an Azure Pipeline
on: [push]
jobs:
  build:
    runs-on: ubuntu-16.04
    steps:
    - name: Download a build artifact from an Azure Pipeline
      uses: git-for-windows/get-azure-pipelines-artifact@v0
      with:
        repository: git/git
        definitionId: 10
        artifact: sparse
    - run: sudo dpkg -i sparse_*.deb

Input parameters

Repository

This Action needs to know in which repository the artifact lives. Example: https://dev.azure.com/git/git/_build shows the Azure Pipelines of the git/git repository. It can be configured like this:

- uses: git-for-windows/get-azure-pipelines-artifact@v0
  with:
    repository: git/git

Pipeline definition ID

Every Azure Pipeline has a numerical identifier that is part of the URL. For example, the "Build sparse for Ubuntu" Pipeline in git/git at https://dev.azure.com/git/git/_build?definitionId=10 has the identifier 10. It needs to be configured via the definitionId key.

- uses: git-for-windows/get-azure-pipelines-artifact@v0
  with:
    definitionId: 10

Artifact name

Pipelines can have an arbitrary number of artifacts, which are identified by a name. The artifact parameter specifies which one to download. It can be omitted if the given Pipeline run has only one artifact attached to it.

Strip prefix

Pipeline artifacts can contain entire directory structures. The stripPrefix parameter allows filtering by a given path prefix; Any files matching that prefix will be written (after stripping the prefix), all other files will be skipped.

Output location

By default, the artifact files will be stored in the current directory. The path parameter can be used to override that.

This directory needs to be unless caching is turned off.

Caching

To accelerate this Action, artifacts are cached once downloaded. This can be turned off by setting the input parameter cache to false.

Developing this Action

First, you'll need to have a reasonably modern version of node handy, such as Node 12.

Install the dependencies

$ npm install

Build the Action and package it for distribution

$ npm run build && npm run package

Run the tests โœ”๏ธ

$ npm test

get-azure-pipelines-artifact's People

Contributors

dscho avatar dependabot[bot] avatar dennisameling avatar

Stargazers

Classic Values avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.