resource

package module
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2021 License: Apache-2.0 Imports: 1 Imported by: 4

README

Tracker Resource

An output only resource that will deliver finished Pivotal Tracker stories that are linked in recent git commits.

Usage

When you use the Pivotal Tracker syntax for finishing a story or fixing a bug this resource will detect it in your commit history and deliver the appropriate stories.

Configuration

Resource
- name: tracker-output
  type: tracker
  source:
    token: TRACKER_API_TOKEN
    project_id: "TRACKER_PROJECT_ID"
    tracker_url: https://www.pivotaltracker.com

Replace TRACKER_API_TOKEN and TRACKER_PROJECT_ID with your API token (which can be found on your profile page) and your project ID (which can be found in the URL of your project). Make sure that your project ID is a string because it will converted to JSON when given to the resource and JSON doesn't like integers.

You'll need a separate resource for each Tracker project.

Build
- name: deploy
  plan:
  - get: git-repo-path
  - ...
  - put: tracker-output
    params:
      repos:
      - git-repo-path
Out Parameters
  • repos: Required. Paths to the git repositories which will contain the delivering commits.

  • comment: Optional. A file containing a comment to leave on any delivered stories.

Development

Prerequisites
  • golang is required - version 1.9.x is tested; earlier versions may also work.
  • docker is required - version 17.06.x is tested; earlier versions may also work.
  • godep is used for dependency management of the golang packages.
Running the tests

The tests have been embedded with the Dockerfile; ensuring that the testing environment is consistent across any docker enabled platform. When the docker image builds, the test are run inside the docker container, on failure they will stop the build.

Run the tests with the following commands for both alpine and ubuntu images:

docker build -t tracker-resource -f dockerfiles/alpine/Dockerfile .
docker build -t tracker-resource -f dockerfiles/ubuntu/Dockerfile .
Contributing

Please make all pull requests to the master branch and ensure tests pass locally.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetadataPair

type MetadataPair struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type Source

type Source struct {
	Token      string `json:"token"`
	ProjectID  string `json:"project_id"`
	TrackerURL string `json:"tracker_url"`
}

type Version

type Version struct {
	Time time.Time `json:"time"`
}

Directories

Path Synopsis
check
cmd/check command
in
cmd/in command
out
cmd/out command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL