Git Product home page Git Product logo

git-branch-heads-resource's Introduction

Git Branch HEADs Resource

Tracks changes made to all branches (or branches matching a filter). This will skip commits on individual branches, but ensure a version is emitted for each change to the branches.

This resource is meant to be used with version: every.

Installation

Add the following resource_types entry to your pipeline:

---
resource_types:
- name: git-branch-heads
  type: docker-image
  source: {repository: vito/git-branch-heads-resource}

Source Configuration

All source configuration is based on the Git resource, with the addition of the following property:

  • branches: Optional. An array of branch name filters. If not specified, all branches are tracked.
  • exclude: Optional A Regex for branches to be excluded. If not specified, no branches are excluded.

The branch configuration from the original resource is ignored for check.

Example

Resource configuration for a repo with a bunch of branches named wip-*:

resources:
- name: my-repo-with-feature-branches
  type: git-branch-heads
  source:
    uri: https://github.com/concourse/atc
    branches: [wip-*]

Resource configuration for a repo with version and branches beginning with feature/ filtered out:

resources:
- name: my-repo-with-feature-branches
  type: git-branch-heads
  source:
    uri: https://github.com/concourse/atc
    exclude: version|feature/.*

Behavior

check: Check for changes to all branches.

The repository is cloned (or pulled if already present), all remote branches are enumerated, and compared to the existing set of branches.

If any branches are new or removed, a new version is emitted including the delta.

in: Fetch the commit that changed the branch.

This resource delegates entirely to the in of the original Git resource, by specifying source.branch as the branch that changed, and version.ref as the commit on the branch.

All params and source configuration of the original resource will be respected.

out: No-op.

Not implemented.

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.