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

Support workingDir init on Windows #4475

Merged
merged 1 commit into from
Jan 14, 2022

Conversation

imjasonh
Copy link
Member

Previously, we used --shell-image (typically distroless/base) to invoke
mkdir -p <dirs> to initialize any working dirs that were needed by
steps in a TaskRun.

This isn't portable to Windows, since distroless/base doesn't provide
Windows images, and since invoking mkdir -p won't work on Windows.

Instead, with this change, we init working dirs using a very simple Go
binary that can be cross-compiled to run on both OSes.

Fixes #4473

cc @lippertmarkus

/kind feature

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • Docs included if any changes are user facing
  • Tests included if any functionality added or changed
  • Follows the commit message standard
  • Meets the Tekton contributor standards (including
    functionality, content, code)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

Release Notes

Working dir initialization is now done using a Go binary in a new container image included in the release, which makes it portable to run on Windows nodes.

@tekton-robot tekton-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Jan 12, 2022
@tekton-robot tekton-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 12, 2022
@tekton-robot
Copy link
Collaborator

The following is the coverage report on the affected files.
Say /test pull-tekton-pipeline-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/pipeline/images.go 100.0% 87.5% -12.5

@imjasonh imjasonh force-pushed the workingdir-init-windows branch 2 times, most recently from be680d9 to 2281e25 Compare January 12, 2022 18:24
@tekton-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: vdemeester

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

@tekton-robot tekton-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 14, 2022
@ghost
Copy link

ghost commented Jan 14, 2022

Very nice, cheers!

/lgtm

@tekton-robot tekton-robot assigned ghost Jan 14, 2022
@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 14, 2022
Previously, we used --shell-image (typically distroless/base) to invoke
`mkdir -p <dirs>` to initialize any working dirs that were needed by
steps in a TaskRun.

This isn't portable to Windows, since distroless/base doesn't provide
Windows images, and since invoking `mkdir -p` won't work on Windows.

Instead, with this change, we init working dirs using a very simple Go
binary that can be cross-compiled to run on both OSes.
@tekton-robot tekton-robot removed lgtm Indicates that a PR is ready to be merged. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jan 14, 2022
@ghost
Copy link

ghost commented Jan 14, 2022

/lgtm

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/feature Categorizes issue or PR as related to a new feature. lgtm 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. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows containers: working dir initializer fails because of missing image for Windows
3 participants