Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bazel docker, cross builds and uploading to s3 #4477

Merged
merged 5 commits into from
Feb 23, 2018

Conversation

mikesplain
Copy link
Contributor

@mikesplain mikesplain commented Feb 20, 2018

This pr includes some updates to bazel building docker images, bazel cross builds, and uploading to s3. From what I can tell, you can now do make bazel-upload and things work end to end as they would with make upload.

I kept bazel-upload, etc. separate since I didn't want to change any existing build stuff, though this should certainly be refactored.

This also pulls in distroless_rules and debian stretch package management utils to build the protokube container with bazel. I'm not sure if this is 100% what we should do but it works well in dev from my testing.

Bazel version 0.10.0

Comments/suggestions welcome!

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 20, 2018
@justinsb justinsb added this to the 1.9 milestone Feb 21, 2018
@justinsb
Copy link
Member

Moving this to 1.9.1 because I don't want it to block 1.9.0, not that we can't merge when it's ready :-)

@justinsb justinsb modified the milestones: 1.9.0, 1.9.1 Feb 21, 2018
@robinpercy
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2018
@k8s-github-robot
Copy link

/lgtm cancel //PR changed after LGTM, removing LGTM. @mikesplain @robinpercy

@k8s-github-robot k8s-github-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 21, 2018
@mikesplain
Copy link
Contributor Author

Wahoo, they pushed new rules_go so I added that for now, for testing purposes.

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 23, 2018
Tested all of these on each of their systems
Need more real testing to ensure all issues are fixed but worked better than not for me
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 23, 2018
@mikesplain mikesplain changed the title WIP: Bazel images makefile Bazel docker, cross builds and uploading to s3 Feb 23, 2018
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Feb 23, 2018
bazel build --experimental_platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //images:dns-controller.tar

.PHONY: bazel-crossbuild-protokube-image
bazel-crossbuild-protokube-image:
Copy link
Contributor

Choose a reason for hiding this comment

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

Got a odd warning here:

WARNING: /private/var/tmp/_bazel_clove/8fb6d18c232e3eae2b829c764cbc089c/external/distroless_rules/WORKSPACE:1: Workspace name in 
/private/var/tmp/_bazel_clove/8fb6d18c232e3eae2b829c764cbc089c/external/distroless_rules/WORKSPACE (@distroless) does not match the name given in the repository's definition (@distroless_rules); this will cause a build error in future versions

@chrislovecnm
Copy link
Contributor

Nice work!!!

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 23, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: chrislovecnm, mikesplain, robinpercy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 23, 2018
@k8s-ci-robot k8s-ci-robot merged commit dd1e209 into kubernetes:master Feb 23, 2018
@mikesplain mikesplain deleted the bazel_images_make branch February 24, 2018 00:04
@mikesplain mikesplain mentioned this pull request Feb 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants