Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Build docker images in Circle CI #95

Merged
merged 2 commits into from May 2, 2018
Merged

Build docker images in Circle CI #95

merged 2 commits into from May 2, 2018

Conversation

sargun
Copy link
Contributor

@sargun sargun commented May 1, 2018

  • Use the build docker images from Circle CI builds
  • Add code coverage metrics
  • Try to collect all of the image builds in one place

@sargun sargun force-pushed the build-images branch 3 times, most recently from fdc0e2d to 3fe3e12 Compare May 1, 2018 17:35
@sargun
Copy link
Contributor Author

sargun commented May 1, 2018

This again requires the "inside" and "outside" GO PATHs to match, but things break under go 1.10 caching (if we share it), and we have a different "inside" and "outside" set of paths.

@@ -0,0 +1,29 @@
FROM ubuntu:bionic
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was being built by hand, and uploaded by hand before.

@@ -0,0 +1,29 @@
FROM ubuntu:xenial
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was being built by hand, and uploaded by hand before.

@@ -0,0 +1,15 @@
#!/bin/sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a combined way to build all the build images.

@@ -44,4 +44,5 @@ ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goveralls is to push the reports

@@ -43,14 +35,16 @@ type testImage struct {
}

var (
// TODO: Determine how this got built, and add it to the auto image builders?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are all bumped to automated build versions.

@@ -1 +1,26 @@
package standalone

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:(

make clean
make --output-sync -j16 builder all 2>&1 | tee build.log
artifact_paths: "*.log;build/distributions/*.deb;build/distributions/*.tar;build/distributions/*.tar.gz"
- command: ./.buildkite/build.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This got moved into a little script

sargun added 2 commits May 1, 2018 12:31
 * Use the build docker images from Circle CI builds
 * Add code coverage metrics
@codecov
Copy link

codecov bot commented May 1, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@0565c1b). Click here to learn what that means.
The diff coverage is 74.78%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master      #95   +/-   ##
=========================================
  Coverage          ?   35.42%           
=========================================
  Files             ?       64           
  Lines             ?     7165           
  Branches          ?        0           
=========================================
  Hits              ?     2538           
  Misses            ?     4327           
  Partials          ?      300
Impacted Files Coverage Δ
cmd/titus-standalone/main.go 0% <0%> (ø)
cmd/titus-reaper/main.go 0% <0%> (ø)
cmd/titus-launchguard-server/main.go 0% <0%> (ø)
cmd/titus-metadata-service/main.go 0% <0%> (ø)
cmd/titus-executor/main.go 4.83% <0%> (ø)
executor/runner/runner.go 58.67% <100%> (ø)
executor/mock/jobrunner.go 74.78% <50%> (ø)
executor/runtime/docker/docker.go 50.62% <88.54%> (ø)

@fabiokung
Copy link
Contributor

fabiokung commented May 2, 2018

LGTM

@sargun I'm still unsure and 👎 on bind mounting GOPATHs, and why we need to share the same cache inside and outside the build containers. I'd rather they have separate caches, they may even be different OSes and arch inside and outside. The build containers can use volumes from a data-only container to cache things across builds if it needs to be sped up.

@sargun
Copy link
Contributor Author

sargun commented May 2, 2018

Getting rid of the data only containers, and sharing caches with the host builds sped things up significantly. Initially doing the test-local, which built the build cache, and then mounting the GOPATH made build times cut down by almost 50%.

@sargun
Copy link
Contributor Author

sargun commented May 2, 2018

If the GOPATH wasn't the same inside and outside of the container, then it wouldn't use the GOPATH. Go seems to freak out whenever it sees bind mounts, or symlinks in gopath. Not sure why.

@sargun sargun merged commit 6495f13 into master May 2, 2018
@sargun sargun deleted the build-images branch May 2, 2018 17:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants