bosh.io stemcell resource
Tracks the versions of a stemcell on bosh.io.
For example, to automatically consume bosh-aws-xen-ubuntu-trusty-go_agent
:
resources:
- name: aws-stemcell
type: bosh-io-stemcell
source:
name: bosh-aws-xen-ubuntu-trusty-go_agent
Source Configuration
-
name
: Required. The name of the stemcell. -
version_family
: Optional. Defaultlatest
. A semantic version used to narrow the returned versions, typically used to fetch hotfixes on older stemcells. For example, aversion_family
of3262.latest
would match3262
,3262.1
, and3262.1.1
, but not3263
. Aversion_family
of3262.1.latest
would match3262.1
and3262.1.1
, but not3262.2
. -
force_regular
: Optional. Defaultfalse
. By default, the resource will always download light stemcells for IaaSes that support light stemcells. Ifforce_regular
istrue
, the resource will ignore light stemcells and always download regular stemcells. -
force_light
: Optional. Defaultfalse
. By default, the resource will always download light stemcells for IaaSes that support light stemcells. Ifforce_light
istrue
, the resource will ignore regular stemcells and always download light stemcells. Withoutforce_light
set it is possible for acheck
to return a regular stemcell in cases where the regular has been published, but the light version is not yet published.
Behavior
check
: Check for new versions of the stemcell.
Detects new versions of the stemcell that have been published to bosh.io. If no version is specified, check
returns the latest version, otherwise check
returns all versions from the version specified on.
in
: Fetch a version of the stemcell.
Fetches a given stemcell, placing the following files in the destination:
version
: The version number of the stemcell.url
: A URL that can be used to download the stemcell tarball.sha1
: The SHA1 of the stemcellsha256
: The SHA256 of the stemcellstemcell.tgz
: The stemcell tarball, if thetarball
param istrue
.
Parameters
tarball
: Optional. Defaulttrue
. Fetch the stemcell tarball.preserve_filename
: Optional. Defaultfalse
. Keep the original filename of the stemcell.
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 bosh-io-stemcell-resource -f dockerfiles/alpine/Dockerfile .
docker build -t bosh-io-stemcell-resource -f dockerfiles/ubuntu/Dockerfile .
Contributing
Please make all pull requests to the master
branch and ensure tests pass
locally.