packer-builder-ticker

command module
v0.0.0-...-b0fe98a Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2014 License: MIT Imports: 2 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

baby-gopher

Packer Ticker Builder

This is a packer builder that I threw together to try out the plugin API. It doesn't build any artifacts. It just spits out periodic, ficticious progress updates for a given duration.

Installation

No binaries are currently published. Simply go get the package source and build/install it.

Configuration

As described on the packer plugin installation page, add the plugin to your ~/.packerconfig.

{
  "builders": {
    "ticker": "packer-builder-ticker"
  }
}

Template definition

Basic Example

In it's simplest form, all you need to do is declare a builder of type ticker.

{
  "builders": [
    { "type": "ticker" }
  ]
}
Configuration Reference

The builder has two configuration options, both optional.

  1. period (int): the period of one notification; i.e., the builder will publish one notification every period seconds [default: 1]
  2. duration (int): the duration for which the builder will run in seconds [default: 5]
Example with configuration options

A configuration as below...

{
  "builders": [
    { "type": "ticker", "period": 2 },
    { "type": "ticker", "name": "other", "duration": 10 }
  ]
}

... will produce output like this.

$ packer build template.json 
ticker output will be in this color.
other output will be in this color.

==> ticker: Running(  2,   5)...
==> other: Running(  1,  10)...
==> other: Building... 1.00007767s
==> ticker: Building... 2.000076307s
==> other: Building... 2.000087931s
==> other: Building... 3.00008243s
==> ticker: Building... 4.000094309s
==> other: Building... 4.00009628s
==> ticker: Done! Stopping...
Build 'ticker' finished.
==> other: Building... 5.000100202s
==> other: Building... 6.000102877s
==> other: Building... 7.000111495s
==> other: Building... 8.000111263s
==> other: Building... 9.00008563s
==> other: Building... 10.000107023s
==> other: Done! Stopping...
Build 'other' finished.

==> Builds finished. The artifacts of successful builds are:

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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