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

Handle file paths base on target platform #3908

Merged
merged 12 commits into from
Jul 10, 2023

Commits on Jul 3, 2023

  1. Handle file paths base on target platform

    This change properly handles paths on different platforms. In short, this
    change checks the target platform we're building an image for and applies
    normalization steps to make sure the file paths are valid. This makes buildkit
    properly handle paths on both *nix systems and on Windows.
    
    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    686a84b View commit details
    Browse the repository at this point in the history
  2. Use current OS as a default

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    236d00b View commit details
    Browse the repository at this point in the history
  3. Rename variable, remove superfluous check

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    7a503ae View commit details
    Browse the repository at this point in the history
  4. Remove nil pointer check and extra NormalizePath

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    b29ec0b View commit details
    Browse the repository at this point in the history
  5. Add nil pointer check in dispatchWorkdir

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    fbbaa39 View commit details
    Browse the repository at this point in the history
  6. Set default platform

     * Set default platform for scratch images
     * Set default platform constraint for FileOps if none is set via
       ConstraintOpt.
     * Explicitly set platform ConstraintOpt in dockerfile frontend based
       on dispatch state platform.
    
    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    0519491 View commit details
    Browse the repository at this point in the history
  7. Ensure we use proper path separators

    In dockerfile2llb we ensure we use proper path separators before we send
    them to LLB.
    
    In LLB we default to linux/amd64 if no constraints are set by the
    caller.
    
    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    edae0c6 View commit details
    Browse the repository at this point in the history
  8. Default to linux in client

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    d425c7c View commit details
    Browse the repository at this point in the history
  9. Remove Architecture

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    45b4617 View commit details
    Browse the repository at this point in the history
  10. Revert most changes to client/llb

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    805b993 View commit details
    Browse the repository at this point in the history
  11. Use system.ToSlash() instead of filepath.ToSlash()

    When running on Linux, filepath.ToSlash() is not suitable to convert paths
    containing Windows path delimiter to Unix delimiters. To enable this, we
    export system.ToSlash() that takes a platform flag, based on which we use
    the proper file path separator, regardless of the platform we run on.
    
    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    69f2c06 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2023

  1. Fix various nits

    Signed-off-by: Gabriel Adrian Samfira <[email protected]>
    gabriel-samfira committed Jul 10, 2023
    Configuration menu
    Copy the full SHA
    f1657ec View commit details
    Browse the repository at this point in the history