Implements a Concourse CI resource type to generate a date time version to be used in your pipeline.
-
timezone
: Optional. The Timezone in which you want the date generated. Default isUTC
. -
format
: Optional. The Format of the output Date Time version, it uses the Go Time Format. Default is20060102-150405
.
None.
None.
---
resource_types:
- name: datetime-version
type: registry-image
source:
repository: dcsg/datetime-version-resource
resources:
- name: datetime-version
type: datetime-version
source:
timezone: 'Europe/Lisbon' # default is 'UTC'
format: '20060102.150405' # default is '20060102-150405'
- name: master-code
type: git
icon: git
source:
uri: https://github.com/dcsg/datetime-version-resource.git
branch: master
jobs:
- name: notify-bugsnag
plan:
- put: datetime-version
- put: master-code
params:
// other git config params
tag: datetime-version/version
only_tag: true
- golang is required - version 1.14.x is tested; earlier versions may also work.
- docker is required - version 19.03.x is tested; earlier versions may also work.
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 command:
docker build -t datetime-version-resource -f dockerfiles/Dockerfile .
Please make all pull requests to the master
branch.