deis / workflow-cli

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

feat(CI): refactor CI to build and then pass around a test image #181

Closed Joshua-Anderson closed 8 years ago

Joshua-Anderson commented 8 years ago

cc @jchauncey

deis-bot commented 8 years ago

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

codecov-io commented 8 years ago

Current coverage is 5.46% (diff: 0.00%)

Merging #181 into master will not change coverage

@@            master      #181   diff @@
========================================
  Files           48        48          
  Lines         3443      3443          
  Methods          0         0          
  Messages         0         0          
  Branches         0         0          
========================================
  Hits           188       188          
  Misses        3236      3236          
  Partials        19        19          

Powered by Codecov. Last update 2103657...ee9bcec

Joshua-Anderson commented 8 years ago

This is now working and ready for reviews.

Joshua-Anderson commented 8 years ago

How this works is that jenkins builds a docker image with the source code and scripts for running tests and linting. This image is then pulled and the specified test, lint, build, and upload commands are run.

I could not make scripts for uploading (the script is hard coded into the jenkinsfile) to protect GCS keys.

Joshua-Anderson commented 8 years ago

Due to the build image update, I had to make some really minor code changes to get CI to pass.

vdice commented 8 years ago

This seems like a neat approach to container-izing the source/deps. It will be interesting to see how we can use this approach in other Workflow component golang projects, if only to avoid installing golang deps directly on ci hosts...

Joshua-Anderson commented 8 years ago

I optimized the Dockerfile to better cache vendored dependencies.

Joshua-Anderson commented 8 years ago

I finally figured out the problem with @vdice's help. For some reason with go1.7 -s no longer seems to work. -extldflags "-static" seems to work though. I kept testing the linux executable on the same container that build the executable, so the dynamic libraries were all found.

Curse the mysterious bash: /usr/local/bin/deis file or folder not found error message.