Add Timestamp git metadata file#329
Merged
jamieklassen merged 4 commits intoconcourse:masterfrom Aug 12, 2020
Merged
Conversation
Signed-off-by: Norman Gehrsitz <gehrsitz.norman@student.dhbw-karlsruhe.de>
Signed-off-by: Norman Gehrsitz <gehrsitz.norman@student.dhbw-karlsruhe.de>
Signed-off-by: Norman Gehrsitz <gehrsitz.norman@student.dhbw-karlsruhe.de>
Signed-off-by: Norman Gehrsitz <gehrsitz.norman@student.dhbw-karlsruhe.de>
jamieklassen
approved these changes
Aug 12, 2020
Member
jamieklassen
left a comment
There was a problem hiding this comment.
Really excellent PR! I was able to test it out by using the following pipeline.yml:
---
resource_types:
- name: git
type: registry-image
source:
repository: concourse/git-resource
tag: pr-ubuntu-329
resources:
- name: ft
type: git
source:
uri: https://github.com/concourse/ft
jobs:
- name: check-timestamp
plan:
- get: ft
params:
timestamp_format: ((format))
- task: read-timestamp
config:
platform: linux
image_resource:
type: registry-image
source: {repository: busybox}
inputs:
- name: ft
run:
path: cat
args: ["ft/.git/commit_timestamp"]so that doing stuff like fly -t dev sp -n -p manual-test -c pipeline.yml -v format=rfc gives me something like
% fly -t dev tj -w -j manual-test/check-timestamp
started manual-test/check-timestamp #7
Cloning into '/tmp/build/get'...
6d13a0d publish continuously
initializing
running cat ft/.git/commit_timestamp
Wed, 5 Aug 2020 12:13:29 -0400
succeeded
The tests are good, as is the documentation!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request improves upon #306.
It adds generation of a timestamp metadata file that can be used to tag builds. The output format can also be specified. This is useful when running parallel builds of a pipeline to determine which version is more up to date after pushing to a build storage like artifactory.