Skip to content

Feature: ability to use current branch as material #15

Open
@technicallyfeasible

Description

@technicallyfeasible

I would like to request a feature.

Background

When creating a feature branch, I would like to setup additional pipelines to build this feature branch before it is merged. This way changes can be previewed by other developers for larger changes.

Implementation

A material is defined like this in build.pipeline.json:

    {
      "url": "[email protected]:company/my-repo.git",
      "branch": "develop",
      "type": "git"
    }

I would like to be able to insert the current branch here so this build works for any branch I specify in the config:

    {
      "url": "[email protected]:company/my-repo.git",
      "branch": "{{CURRENT_BRANCH}}",
      "type": "git"
    }

The placeholder {{CURRENT_BRANCH}} would be replaced with the value in the config xml when the plugin is loading the config into GoCD.

    <config-repo pluginId="json.config.plugin" id="my-repo">
      <git url="[email protected]:company/my-repo.git" branch="my-feature-branch" />
    </config-repo>

In this case:

{{CURRENT_BRANCH}} => my-feature-branch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions