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

Add Dockerfile for pullrequest nonroot build base image #3810

Merged
merged 1 commit into from
Mar 12, 2021

Conversation

zhangtbj
Copy link
Contributor

@zhangtbj zhangtbj commented Mar 8, 2021

Changes

As discussed in the issue: #3746

It was planed to support to run pullrequset init image by both root and non-root USER. And in the end, we have an agreement to provide a new Dockerfile on distroless and adding a nonroot 65532 USER.

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

  • [ n ] Includes tests (if functionality changed/added)
  • [ n ] Includes docs (if user facing)
  • [ n ] Commit messages follow commit message best practices
  • [ y ] Release notes block has been filled in or deleted (only if no user facing changes)

/kind misc

Release Notes

For pull requests with a release note:

Add Dockerfile for pullrequset nonroot build base image

@tekton-robot tekton-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/misc Categorizes issue or PR as a miscellaneuous one. labels Mar 8, 2021
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Mar 8, 2021
@tekton-robot
Copy link
Collaborator

Hi @zhangtbj. Thanks for your PR.

I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@tekton-robot tekton-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 8, 2021
@zhangtbj zhangtbj changed the title WIP: Add Dockerfile for pullrequset nonroot build base image Add Dockerfile for pullrequset nonroot build base image Mar 8, 2021
@tekton-robot tekton-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 8, 2021
@ghost
Copy link

ghost commented Mar 8, 2021

/ok-to-test
/approve

@tekton-robot tekton-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 8, 2021
@ghost
Copy link

ghost commented Mar 8, 2021

Hrm, this might be more tricky than it appears because there's no existing nightly images with the git-init-build-base or pullrequest-init-build-base name.

@zhangtbj
Copy link
Contributor Author

zhangtbj commented Mar 9, 2021

Thanks @sbwsg ,

So is there any workaround to allow build and upload the new images first (maybe manually) before running test?

I think this task (https://github.com/tektoncd/pipeline/blob/master/tekton/build-push-ma-base-image.yaml#L27) was not executed in the PR CI process... :(

@ghost
Copy link

ghost commented Mar 9, 2021

OK, I think what we should do is split this PR in two. In the first PR we just add the new images (while still keeping build-base building and in use). Then once that's merged open a new PR which switches git-init and pullrequest-init's base image over to the new ones. We can also remove mention of build-base at that time.

@zhangtbj wdyt?

@tekton-robot tekton-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 Mar 9, 2021
@zhangtbj
Copy link
Contributor Author

zhangtbj commented Mar 9, 2021

Sure thing and good idea! @sbwsg ,

I just added the new dockerfile and new build config in this PR and keep using the original build image and config.

Once it is merged, I can provide another PR to use the new generated images.

@afrittoli afrittoli changed the title Add Dockerfile for pullrequset nonroot build base image Add Dockerfile for pullrequest nonroot build base image Mar 9, 2021
@afrittoli
Copy link
Member

Sure thing and good idea! @sbwsg ,

I just added the new dockerfile and new build config in this PR and keep using the original build image and config.

Once it is merged, I can provide another PR to use the new generated images.

Thank you! 🙏

@ghost
Copy link

ghost commented Mar 9, 2021

/test pull-tekton-pipeline-integration-tests

@zhangtbj
Copy link
Contributor Author

All tests passed now.

Please help to move forward.

Thanks all! :)

Base automatically changed from master to main March 11, 2021 15:29
@zhangtbj
Copy link
Contributor Author

/retest

1 similar comment
@zhangtbj
Copy link
Contributor Author

/retest

@zhangtbj
Copy link
Contributor Author

Interesting, it passed before, but fail at integration-tests, but we didn't change the code of those tests...

@ghost
Copy link

ghost commented Mar 12, 2021

Try rebasing on top of main - the main branch of the pipelines repo was changed yesterday. The errors we're seeing here should be fixed by caa661d

@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: sbwsg

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

@zhangtbj
Copy link
Contributor Author

Thanks @sbwsg ,

I rebased my PR, the test passed now.

@psschwei
Copy link
Contributor

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 12, 2021
@tekton-robot tekton-robot merged commit 0599752 into tektoncd:main Mar 12, 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. kind/misc Categorizes issue or PR as a miscellaneuous one. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants