Skip to content

Handle simple glob patterns when upgrading the sync patterns#2287

Merged
dgageot merged 2 commits intoGoogleContainerTools:masterfrom
corneliusweig:sync/fix-single-star-upgrade
Jun 19, 2019
Merged

Handle simple glob patterns when upgrading the sync patterns#2287
dgageot merged 2 commits intoGoogleContainerTools:masterfrom
corneliusweig:sync/fix-single-star-upgrade

Conversation

@corneliusweig
Copy link
Copy Markdown
Contributor

Also simple glob patterns are flattened at the destination. The translation to the new sync config was not handled correctly for cases such as:

- public/*: /app/public
- public/index.html: /app/public

Now, for compatible source patterns, the strip field is correctly populated. For example:
IN:

apiVersion: skaffold/v1beta8
kind: Config
build:
  artifacts:
  - image: myimage
    sync:
      public/*: /app/public

OUT (skaffold fix):

apiVersion: skaffold/v1beta11
kind: Config
build:
  artifacts:
  - image: myimage
    sync:
      manual:
      - src: public/*
        dest: /app/

This requires also a simplification of the sync rule, if strip is a suffix of dest, which is now also applied to triple-star patterns.

Fix #2280

Also simple glob patterns are flattened at the destination. The translation to the new sync config was not handled correctly for cases such as:
- public/*: /app/public
- public/index.html: /app/public

Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
@corneliusweig corneliusweig force-pushed the sync/fix-single-star-upgrade branch from c387824 to 74bede4 Compare June 18, 2019 19:23
@dgageot
Copy link
Copy Markdown
Contributor

dgageot commented Jun 19, 2019

Signed-off-by: Cornelius Weig <22861411+corneliusweig@users.noreply.github.com>
@corneliusweig corneliusweig force-pushed the sync/fix-single-star-upgrade branch from 74bede4 to b767165 Compare June 19, 2019 08:24
@corneliusweig
Copy link
Copy Markdown
Contributor Author

Whoops o_O .. fixed

@dgageot dgageot added the kokoro:run runs the kokoro jobs on a PR label Jun 19, 2019
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Jun 19, 2019
@dgageot dgageot merged commit 14bf34e into GoogleContainerTools:master Jun 19, 2019
@corneliusweig corneliusweig deleted the sync/fix-single-star-upgrade branch June 19, 2019 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Old sync config stops working

4 participants