deis / workflow-cli

The CLI for Deis Workflow
http://deis.com
MIT License
31 stars 43 forks source link

feat(Makefile): add git branch and sha information to the uploaded blob #177

Closed helgi closed 8 years ago

helgi commented 8 years ago

https://cloud.google.com/storage/docs/gsutil/addlhelp/WorkingWithObjectMetadata?hl=en_US#custom-metadata

deis-bot commented 8 years ago

@Joshua-Anderson and @vdice are potential reviewers of this pull request based on my analysis of git blame information. Thanks @helgi!

codecov-io commented 8 years ago

Current coverage is 5.35% (diff: 100%)

Merging #177 into master will not change coverage

@@            master      #177   diff @@
========================================
  Files           46        46          
  Lines         3284      3284          
  Methods          0         0          
  Messages         0         0          
  Branches         0         0          
========================================
  Hits           176       176          
  Misses        3086      3086          
  Partials        22        22          

Powered by Codecov. Last update 6c1332d...47def28

slack commented 8 years ago

Some unique job identifier would be amazing.

helgi commented 8 years ago

Any ideas what that could be in Jenkins? @jchauncey do you know of any good ones ? I could make it env.BUILD_URL which basically just links back to the overall job, name, id and all that. Thoughts?

helgi commented 8 years ago

Decided to go wild, JOB_NAME, BUILD_NUMER and BUILD_URL - At this point more information is better

helgi commented 8 years ago
docker run --rm -v /home/jenkins/workspace/Deis/workflow-cli/PR-177/gopath/src/github.com/deis/workflow-cli/tmp:/.config -v /home/jenkins/workspace/Deis/workflow-cli/PR-177/gopath/src/github.com/deis/workflow-cli/_dist:/upload google/cloud-sdk:latest gsutil -mq -h x-goog-meta-git-branch:remotes/origin/pr/177 -h x-goog-meta-git-sha:47def285be17a4fe8b8ffd6b758e82a9bd948e0a -h x-goog-meta-ci-job:Deis/workflow-cli/PR-177 -h x-goog-meta-ci-number:8 -h x-goog-meta-ci-url:https://ci.deis.io/job/Deis/job/workflow-cli/job/PR-177/8/ cp -a public-read -r /upload/* gs://workflow-cli

A bit repetitive since the BUILD_URL has the whole shebang in it but whatever. Going with this