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

Replace Bazel image creation with Docker #323

Merged
merged 1 commit into from
Jul 1, 2021

Conversation

tylerferrara
Copy link
Contributor

@tylerferrara tylerferrara commented Jun 28, 2021

What type of PR is this?

/kind cleanup
/kind deprecation

What this PR does / why we need it:

This change aims to remove the reliance on Bazel for image creation. This leed to the modification of the following make targets:

  • [deleted] image-load
  • [deleted] image
  • [modified] image-push

The two deprecated targets are not needed when migrating to docker. The push-cip.sh automates building, tagging, and pushing both CIP and Auditor images. This script ports the functionality of the existing push-cip-auditor-test.sh script, deprecating it in the process.

Usage: push-cip.sh [--audit | -a]

Partially satisfies #300
Part of the effort to reduce build maintenance.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

The Dockerfile now uses a multi-stage build process. When building, you must provide which build variant as a --build-arg. Below is an example of building the cip variant.

docker build --build-arg variant=cip /path/to/Dockerfile

This way, we can rely on one Dockerfile to build two different container variants. The auditor variant only uses golang as a base, where the cip variant uses golang and gcloud base images.

Does this PR introduce a user-facing change?

Created a multi-stage Dockerfile for cip and auditor build variants.
Created push-cip.sh script to replace push-cip-auditor-test.sh.
Removed Bazel container building within Makefile.

cc: @listx @amwat @justaugustus @kubernetes-sigs/release-engineering

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Jun 28, 2021
@k8s-ci-robot k8s-ci-robot added area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. wg/k8s-infra size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 28, 2021
@tylerferrara tylerferrara changed the title [WIP] Remove Bazel image creation [WIP] Replace Bazel image creation with Docker Jun 28, 2021
@tylerferrara tylerferrara force-pushed the push-cip branch 2 times, most recently from e70c352 to 88680c8 Compare June 28, 2021 19:13
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 28, 2021
@tylerferrara tylerferrara mentioned this pull request Jun 28, 2021
8 tasks
@tylerferrara tylerferrara changed the title [WIP] Replace Bazel image creation with Docker Replace Bazel image creation with Docker Jun 28, 2021
@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 Jun 28, 2021
@tylerferrara
Copy link
Contributor Author

/assign @listx

hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Outdated Show resolved Hide resolved
@tylerferrara tylerferrara force-pushed the push-cip branch 4 times, most recently from 4fa5685 to 86c5599 Compare June 28, 2021 22:38
hack/push-cip.sh Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2021
hack/push-cip.sh Outdated Show resolved Hide resolved
test-e2e/golden-images/push-golden.sh Outdated Show resolved Hide resolved
hack/push-cip.sh Show resolved Hide resolved
Dockerfile Outdated Show resolved Hide resolved
@listx
Copy link
Contributor

listx commented Jul 1, 2021

/hold

I'd like to reserve this hold.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2021
@tylerferrara tylerferrara force-pushed the push-cip branch 6 times, most recently from eb1571c to ad9f05e Compare July 1, 2021 20:50
@listx
Copy link
Contributor

listx commented Jul 1, 2021

/lgtm
/approve

Thanks! @tylerferrara Remove hold when ready.

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: listx, tylerferrara

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 Jul 1, 2021
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2021
@tylerferrara
Copy link
Contributor Author

/test pull-cip-image-cip

@tylerferrara
Copy link
Contributor Author

/test pull-cip-image-cip

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 1, 2021
@tylerferrara
Copy link
Contributor Author

/hold cancel

1 similar comment
@listx
Copy link
Contributor

listx commented Jul 1, 2021

/hold cancel

@listx
Copy link
Contributor

listx commented Jul 1, 2021

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 1, 2021
@k8s-ci-robot k8s-ci-robot merged commit fa57fc1 into kubernetes-sigs:master Jul 1, 2021
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 1, 2021
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 1, 2021
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 1, 2021
tylerferrara pushed a commit to tylerferrara/k8s-container-image-promoter that referenced this pull request Jul 1, 2021
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. area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. kind/deprecation Categorizes issue or PR as related to a feature/enhancement marked for deprecation. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. 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.

4 participants