-
Notifications
You must be signed in to change notification settings - Fork 262
images: Pin bazel to specific version in docker image #3239
images: Pin bazel to specific version in docker image #3239
Conversation
|
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@trawler this looks good so far. We also need to build the image, push it to docker, and update the tag in the Jenkinsfile. Once that is done, we need to trigger smoke tests to make sure everything still builds correctly 👍
alexsomesan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but also what @squat said.
e6ebf99 to
2639ebd
Compare
2639ebd to
5d1960e
Compare
|
ok to test |
|
retest this please |
images/tectonic-builder/Dockerfile
Outdated
| RUN go get github.com/jstemmer/go-junit-report | ||
|
|
||
| ### Tools used by 'make structure-check' | ||
| RUN go get github.com/segmentio/terraform-docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should probably go away as well
| && curl -LO "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel_${BAZEL_VERSION}-linux-x86_64.deb" \ | ||
| && dpkg -i bazel_*.deb | ||
|
|
||
| RUN apt --fix-broken install -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you clarify why do we need the additional libraries above and this last RUN?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Google removes all older bazel versions from their apt repo. So in order to fetch older versions we need to install it from github. The last RUN is supposed to install all the declared dependencies in the deb file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the additional libraries are required per the documentation: https://docs.bazel.build/versions/master/install-ubuntu.html
1a49fbb (Move structure-check tools from Jenkinsfile to builder image, 2017-09-12, coreos/tectonic-installer#1889), added a: RUN go get github.com/s-urbaniak/terraform-examples to this Dockerfile. That package moved into the installer repository, but all we need for generation/testing is the terraform-examples binary, so a68555d (tests/ci: fix dockerfile and remove some layers, 2017-12-19, coreos/tectonic-installer#2600) removed the associated source with: RUN go get github.com/coreos/tectonic-installer/contrib/terraform-examples && \ rm -rf /go/src/github.com/coreos/tectonic-installer/ (i.e. "download github.com/coreos/tectonic-installer/contrib/terraform-examples, build terraform-examples, install it into $GOBIN, and remove the source"). d61abd4 (*: cleanup bazel rules, 2018-03-26, coreos/tectonic-installer#3137) removed the Makefile which had been calling terraform-examples, and 7c73c34 (remove terraform-examples from the tectonic-builder image, 2018-05-18, coreos/tectonic-installer#3239) removed the terraform-examples install from this Dockerfile. With the terraform-examples install removed, Go will no longer be downloading that source, so there's no longer any reason to remove it. This commit removes the unnecessary removal, which should make Dockerfile builds a bit faster and save an empty layer in the resulting images. More importantly, it avoids distracting future devs reading the Dockerfile source ;).
1a49fbb (Move structure-check tools from Jenkinsfile to builder image, 2017-09-12, coreos/tectonic-installer#1889), added a: RUN go get github.com/s-urbaniak/terraform-examples to this Dockerfile. That package moved into the installer repository, but all we need for generation/testing is the terraform-examples binary, so a68555d (tests/ci: fix dockerfile and remove some layers, 2017-12-19, coreos/tectonic-installer#2600) removed the associated source with: RUN go get github.com/coreos/tectonic-installer/contrib/terraform-examples && \ rm -rf /go/src/github.com/coreos/tectonic-installer/ (i.e. "download github.com/coreos/tectonic-installer/contrib/terraform-examples, build terraform-examples, install it into $GOBIN, and remove the source"). d61abd4 (*: cleanup bazel rules, 2018-03-26, coreos/tectonic-installer#3137) removed the Makefile which had been calling terraform-examples, and 7c73c34 (remove terraform-examples from the tectonic-builder image, 2018-05-18, coreos/tectonic-installer#3239) removed the terraform-examples install from this Dockerfile. With the terraform-examples install removed, Go will no longer be downloading that source, so there's no longer any reason to remove it. This commit removes the unnecessary removal, which should make Dockerfile builds a bit faster and save an empty layer in the resulting images. More importantly, it avoids distracting future devs reading the Dockerfile source ;).
fixes #INST-1058