semver-resource

module
v0.0.0-...-e4f2895 Latest Latest
Warning

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

Go to latest
Published: May 19, 2016 License: Apache-2.0

README

Semver Resource

A resource for managing a version number. Persists the version number in an S3 bucket or a Git repository.

Source Configuration

  • initial_version: Optional. The version number to use when bootstrapping, i.e. when there is not a version number present in the source.

  • driver: Optional. Default s3. The driver to use for tracking the version. Determines where the version is stored.

There are three supported drivers, with their own sets of properties for configuring them.

git Driver

The git driver works by modifying a file in a repository with every bump. The git driver has the advantage of being able to do atomic updates.

  • uri: Required. The repository URL.

  • branch: Required. The branch the file lives on.

  • file: Required. The name of the file in the repository.

  • private_key: Optional. The SSH private key to use when pulling from/pushing to the repository.

  • git_user: Optional. The git identity to use when pushing to the repository support RFC 5322 address of the form "Gogh Fir gf@example.com" or "foo@example.com".

s3 Driver

The s3 driver works by modifying a file in a bucket.

  • bucket: Required. The name of the bucket.

  • key: Required. The key to use for the object in the bucket tracking the version.

  • access_key_id: Required. The AWS access key to use when accessing the bucket.

  • secret_access_key: Required. The AWS secret key to use when accessing the bucket.

  • region_name: Optional. Default us-east-1. The region the bucket is in.

  • endpoint: Optional. Custom endpoint for using S3 compatible provider.

swift Driver

The swift driver works by modifying a file in a container.

  • openstack Required. All openstack configuration must go under this key.

    • container: Required. The name of the container.

    • item_name: Required. The item name to use for the object in the container tracking the version.

    • region_name: Required. The region the container is in.

    • identity_endpoint, username, user_id, password, api_key, domain_id, domain_name, tenant_id, tenant_name, allow_reauth, token_id: See below The swift driver uses gophercloud to handle interacting with OpenStack. All OpenStack Identity versions are supported through this library. The Authentication properties will pass through to it. For detailed information about the individual parameters, see https://github.com/rackspace/gophercloud/blob/master/auth_options.go

Example

With the following resource configuration:

resources:
- name: version
  type: semver
  source:
    driver: git
    uri: git@github.com:concourse/concourse.git
    branch: version
    file: version
    private_key: {{concourse-repo-private-key}}

Bumping with a get and then a put:

plan:
- get: version
  params: {bump: minor}
- task: a-thing-that-needs-a-version
- put: version
  params: {file: version/number}

Or, bumping with an atomic put:

plan:
- put: version
  params: {bump: minor}
- task: a-thing-that-needs-a-version

Behavior

check: Report the current version number.

Detects new versions by reading the file from the specified source. If the file is empty, it returns the initial_version. If the file is not empty, it returns the version specified in the file if it is equal to or greater than current version, otherwise it returns no versions.

in: Provide the version as a file, optionally bumping it.

Provides the version number to the build as a number file in the destination.

Can be configured to bump the version locally, which can be useful for getting the final version ahead of time when building artifacts.

Parameters

Note that bump and pre don't update the version resource - they just modify the version that gets provided to the build. An output must be explicitly specified to actually update the version.

out: Set the version or bump the current one.

Given a file, use its contents to update the version. Or, given a bump strategy, bump whatever the current version is. If there is no current version, the bump will be based on initial_version.

The file parameter should be used if you have a particular version that you want to force the current version to be. This can be used in combination with in, but it's probably better to use the bump and pre params as they'll perform an atomic in-place bump if possible with the driver.

Parameters

One of the following must be specified:

  • file: Optional. Path to a file containing the version number to set.

  • bump and pre: Optional. See Version Bumping Semantics.

When bump and/or pre are used, the version bump will be applied atomically, if the driver supports it. That is, if we pull down version N, and bump to N+1, the driver can then compare-and-swap. If the compare-and-swap fails because there's some new version M, the driver will re-apply the bump to get M+1, and try again (in a loop).

Version Bumping Semantics

Both in and out support bumping the version semantically via two params: bump and pre:

  • bump: Optional. Bump the version number semantically. The value must be one of:

    • major: Bump the major version number, e.g. 1.0.0 -> 2.0.0.
    • minor: Bump the minor version number, e.g. 0.1.0 -> 0.2.0.
    • patch: Bump the patch version number, e.g. 0.0.1 -> 0.0.2.
    • final: Promote the version to a final version, e.g. 1.0.0-rc.1 -> 1.0.0.
  • pre: Optional. When bumping, bump to a prerelease (e.g. rc or alpha), or bump an existing prerelease.

If present, and the version is already a prerelease matching this value, its number is bumped. If the version is already a prerelease of another type, (e.g. alpha vs. beta), the type is switched and the prerelease version is reset to 1. If the version is not already a pre-release, then pre is added, starting at 1.

Directories

Path Synopsis
Godeps
_workspace/src/github.com/aws/aws-sdk-go/aws
Package aws provides core functionality for making requests to AWS services.
Package aws provides core functionality for making requests to AWS services.
_workspace/src/github.com/aws/aws-sdk-go/aws/awserr
Package awserr represents API error interface accessors for the SDK.
Package awserr represents API error interface accessors for the SDK.
_workspace/src/github.com/aws/aws-sdk-go/aws/credentials
Package credentials provides credential retrieval and management
Package credentials provides credential retrieval and management
_workspace/src/github.com/aws/aws-sdk-go/aws/defaults
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
_workspace/src/github.com/aws/aws-sdk-go/aws/ec2metadata
Package ec2metadata provides the client for making API calls to the EC2 Metadata service.
Package ec2metadata provides the client for making API calls to the EC2 Metadata service.
_workspace/src/github.com/aws/aws-sdk-go/aws/session
Package session provides a way to create service clients with shared configuration and handlers.
Package session provides a way to create service clients with shared configuration and handlers.
_workspace/src/github.com/aws/aws-sdk-go/private/endpoints
Package endpoints validates regional endpoints for services.
Package endpoints validates regional endpoints for services.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/query
Package query provides serialisation of AWS query requests, and responses.
Package query provides serialisation of AWS query requests, and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/rest
Package rest provides RESTful serialization of AWS requests and responses.
Package rest provides RESTful serialization of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/restxml
Package restxml provides RESTful XML serialisation of AWS requests and responses.
Package restxml provides RESTful XML serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
Package xmlutil provides XML serialisation of AWS requests and responses.
Package xmlutil provides XML serialisation of AWS requests and responses.
_workspace/src/github.com/aws/aws-sdk-go/private/signer/v4
Package v4 implements signing for AWS V4 signer
Package v4 implements signing for AWS V4 signer
_workspace/src/github.com/aws/aws-sdk-go/service/s3
Package s3 provides a client for Amazon Simple Storage Service.
Package s3 provides a client for Amazon Simple Storage Service.
_workspace/src/github.com/go-ini/ini
Package ini provides INI file read and write functionality in Go.
Package ini provides INI file read and write functionality in Go.
_workspace/src/github.com/mitchellh/mapstructure
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
The mapstructure package exposes functionality to convert an abitrary map[string]interface{} into a native Go structure.
_workspace/src/github.com/nu7hatch/gouuid
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
This package provides immutable UUID structs and the functions NewV3, NewV4, NewV5 and Parse() for generating versions 3, 4 and 5 UUIDs as specified in RFC 4122.
_workspace/src/github.com/onsi/ginkgo
Ginkgo is a BDD-style testing framework for Golang
Ginkgo is a BDD-style testing framework for Golang
_workspace/src/github.com/onsi/ginkgo/config
Ginkgo accepts a number of configuration options.
Ginkgo accepts a number of configuration options.
The Ginkgo CLI
_workspace/src/github.com/onsi/ginkgo/internal/remote
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Aggregator is a reporter used by the Ginkgo CLI to aggregate and present parallel test output coherently as tests complete.
Ginkgo's Default Reporter
_workspace/src/github.com/onsi/gomega
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
Gomega is the Ginkgo BDD-style testing framework's preferred matcher library.
_workspace/src/github.com/onsi/gomega/format
Gomega's format package pretty-prints objects.
Gomega's format package pretty-prints objects.
_workspace/src/github.com/onsi/gomega/gbytes
Package gbytes provides a buffer that supports incrementally detecting input.
Package gbytes provides a buffer that supports incrementally detecting input.
_workspace/src/github.com/onsi/gomega/gexec
Package gexec provides support for testing external processes.
Package gexec provides support for testing external processes.
_workspace/src/github.com/onsi/gomega/ghttp
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
Package ghttp supports testing HTTP clients by providing a test server (simply a thin wrapper around httptest's server) that supports registering multiple handlers.
_workspace/src/github.com/onsi/gomega/ghttp/protobuf
Package protobuf is a generated protocol buffer package.
Package protobuf is a generated protocol buffer package.
Gomega matchers
_workspace/src/github.com/rackspace/gophercloud
Package gophercloud provides a multi-vendor interface to OpenStack-compatible clouds.
Package gophercloud provides a multi-vendor interface to OpenStack-compatible clouds.
_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v2/tenants
Package tenants provides information and interaction with the tenants API resource for the OpenStack Identity service.
Package tenants provides information and interaction with the tenants API resource for the OpenStack Identity service.
_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v2/tokens
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service.
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service.
_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/tokens
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service.
Package tokens provides information and interaction with the token API resource for the OpenStack Identity service.
_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/accounts
Package accounts contains functionality for working with Object Storage account resources.
Package accounts contains functionality for working with Object Storage account resources.
_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/containers
Package containers contains functionality for working with Object Storage container resources.
Package containers contains functionality for working with Object Storage container resources.
_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/objects
Package objects contains functionality for working with Object Storage object resources.
Package objects contains functionality for working with Object Storage object resources.
_workspace/src/github.com/rackspace/gophercloud/pagination
Package pagination contains utilities and convenience structs that implement common pagination idioms within OpenStack APIs.
Package pagination contains utilities and convenience structs that implement common pagination idioms within OpenStack APIs.
_workspace/src/github.com/rackspace/gophercloud/rackspace/blockstorage/v1/snapshots
Package snapshots provides information and interaction with the snapshot API resource for the Rackspace Block Storage service.
Package snapshots provides information and interaction with the snapshot API resource for the Rackspace Block Storage service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumes
Package volumes provides information and interaction with the volume API resource for the Rackspace Block Storage service.
Package volumes provides information and interaction with the volume API resource for the Rackspace Block Storage service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumetypes
Package volumetypes provides information and interaction with the volume type API resource for the Rackspace Block Storage service.
Package volumetypes provides information and interaction with the volume type API resource for the Rackspace Block Storage service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/base
Package base provides information and interaction with the base API resource in the Rackspace CDN service.
Package base provides information and interaction with the base API resource in the Rackspace CDN service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/flavors
Package flavors provides information and interaction with the flavors API resource in the Rackspace CDN service.
Package flavors provides information and interaction with the flavors API resource in the Rackspace CDN service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/serviceassets
Package serviceassets provides information and interaction with the serviceassets API resource in the Rackspace CDN service.
Package serviceassets provides information and interaction with the serviceassets API resource in the Rackspace CDN service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/services
Package services provides information and interaction with the services API resource in the Rackspace CDN service.
Package services provides information and interaction with the services API resource in the Rackspace CDN service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/flavors
Package flavors provides information and interaction with the flavor API resource for the Rackspace Cloud Servers service.
Package flavors provides information and interaction with the flavor API resource for the Rackspace Cloud Servers service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/images
Package images provides information and interaction with the image API resource for the Rackspace Cloud Servers service.
Package images provides information and interaction with the image API resource for the Rackspace Cloud Servers service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/keypairs
Package keypairs provides information and interaction with the keypair API resource for the Rackspace Cloud Servers service.
Package keypairs provides information and interaction with the keypair API resource for the Rackspace Cloud Servers service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/networks
Package networks provides information and interaction with the network API resource for the Rackspace Cloud Servers service.
Package networks provides information and interaction with the network API resource for the Rackspace Cloud Servers service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/servers
Package servers provides information and interaction with the server API resource for the Rackspace Cloud Servers service.
Package servers provides information and interaction with the server API resource for the Rackspace Cloud Servers service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/volumeattach
Package volumeattach provides the ability to attach and detach volume to instances to Rackspace servers
Package volumeattach provides the ability to attach and detach volume to instances to Rackspace servers
_workspace/src/github.com/rackspace/gophercloud/rackspace/db/v1/backups
Package backups provides information and interaction with the backup API resource in the Rackspace Database service.
Package backups provides information and interaction with the backup API resource in the Rackspace Database service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/db/v1/databases
Package databases provides information and interaction with the database API resource in the Rackspace Database service.
Package databases provides information and interaction with the database API resource in the Rackspace Database service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/db/v1/flavors
Package flavors provides information and interaction with the flavor API resource in the Rackspace Database service.
Package flavors provides information and interaction with the flavor API resource in the Rackspace Database service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/db/v1/instances
Package instances provides information and interaction with the instance API resource in the Rackspace Database service.
Package instances provides information and interaction with the instance API resource in the Rackspace Database service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/db/v1/users
Package users provides information and interaction with the user API resource in the Rackspace Database service.
Package users provides information and interaction with the user API resource in the Rackspace Database service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/extensions
Package extensions provides information and interaction with the all the extensions available for the Rackspace Identity service.
Package extensions provides information and interaction with the all the extensions available for the Rackspace Identity service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/tenants
Package tenants provides information and interaction with the tenant API resource for the Rackspace Identity service.
Package tenants provides information and interaction with the tenant API resource for the Rackspace Identity service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/tokens
Package tokens provides information and interaction with the token API resource for the Rackspace Identity service.
Package tokens provides information and interaction with the token API resource for the Rackspace Identity service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/acl
Package acl provides information and interaction with the access lists feature of the Rackspace Cloud Load Balancer service.
Package acl provides information and interaction with the access lists feature of the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/lbs
Package lbs provides information and interaction with the Load Balancer API resource for the Rackspace Cloud Load Balancer service.
Package lbs provides information and interaction with the Load Balancer API resource for the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/monitors
Package monitors provides information and interaction with the Health Monitor API resource for the Rackspace Cloud Load Balancer service.
Package monitors provides information and interaction with the Health Monitor API resource for the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/nodes
Package nodes provides information and interaction with the Node API resource for the Rackspace Cloud Load Balancer service.
Package nodes provides information and interaction with the Node API resource for the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/sessions
Package sessions provides information and interaction with the Session Persistence feature of the Rackspace Cloud Load Balancer service.
Package sessions provides information and interaction with the Session Persistence feature of the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/ssl
Package ssl provides information and interaction with the SSL Termination feature of the Rackspace Cloud Load Balancer service.
Package ssl provides information and interaction with the SSL Termination feature of the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/throttle
Package throttle provides information and interaction with the Connection Throttling feature of the Rackspace Cloud Load Balancer service.
Package throttle provides information and interaction with the Connection Throttling feature of the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/vips
Package vips provides information and interaction with the Virtual IP API resource for the Rackspace Cloud Load Balancer service.
Package vips provides information and interaction with the Virtual IP API resource for the Rackspace Cloud Load Balancer service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/networking/v2/security
Package security contains functionality to work with security group and security group rules Neutron resources.
Package security contains functionality to work with security group and security group rules Neutron resources.
_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/accounts
Package accounts provides information and interaction with the account API resource for the Rackspace Cloud Files service.
Package accounts provides information and interaction with the account API resource for the Rackspace Cloud Files service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/bulk
Package bulk provides functionality for working with bulk operations in the Rackspace Cloud Files service.
Package bulk provides functionality for working with bulk operations in the Rackspace Cloud Files service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdncontainers
Package cdncontainers provides information and interaction with the CDN Container API resource for the Rackspace Cloud Files service.
Package cdncontainers provides information and interaction with the CDN Container API resource for the Rackspace Cloud Files service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdnobjects
Package cdnobjects provides information and interaction with the CDN Object API resource for the Rackspace Cloud Files service.
Package cdnobjects provides information and interaction with the CDN Object API resource for the Rackspace Cloud Files service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/containers
Package containers provides information and interaction with the Container API resource for the Rackspace Cloud Files service.
Package containers provides information and interaction with the Container API resource for the Rackspace Cloud Files service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/objects
Package objects provides information and interaction with the Object API resource for the Rackspace Cloud Files service.
Package objects provides information and interaction with the Object API resource for the Rackspace Cloud Files service.
_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/buildinfo
Package buildinfo provides build information about heat deployments.
Package buildinfo provides build information about heat deployments.
_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stackevents
Package stackevents provides operations for finding, listing, and retrieving stack events.
Package stackevents provides operations for finding, listing, and retrieving stack events.
_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stackresources
Package stackresources provides operations for working with stack resources.
Package stackresources provides operations for working with stack resources.
_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stacks
Package stacks provides operation for working with Heat stacks.
Package stacks provides operation for working with Heat stacks.
_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stacktemplates
Package stacktemplates provides operations for working with Heat templates.
Package stacktemplates provides operations for working with Heat templates.
_workspace/src/github.com/rackspace/gophercloud/rackspace/rackconnect/v3
Package rackconnect allows Rackspace cloud accounts to leverage version 3 of RackConnect, Rackspace's hybrid connectivity solution connecting dedicated and cloud servers.
Package rackconnect allows Rackspace cloud accounts to leverage version 3 of RackConnect, Rackspace's hybrid connectivity solution connecting dedicated and cloud servers.
_workspace/src/github.com/rackspace/gophercloud/rackspace/rackconnect/v3/lbpools
Package lbpools provides access to load balancer pools associated with a RackConnect configuration.
Package lbpools provides access to load balancer pools associated with a RackConnect configuration.
_workspace/src/github.com/rackspace/gophercloud/testhelper
Package testhelper container methods that are useful for writing unit tests.
Package testhelper container methods that are useful for writing unit tests.

Jump to

Keyboard shortcuts

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