-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fix and improve sync samples #2131
Fix and improve sync samples #2131
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2131 +/- ##
=======================================
Coverage 56.33% 56.33%
=======================================
Files 180 180
Lines 7840 7840
=======================================
Hits 4417 4417
Misses 3002 3002
Partials 421 421 Continue to review full report at Codecov.
|
41e1926
to
ed693aa
Compare
@corneliusweig Could you take a look at those fixes? Thanks! |
@@ -5,9 +5,8 @@ build: | |||
- image: gcr.io/k8s-skaffold/react-reload | |||
context: app | |||
sync: | |||
'src/components/*': src/components/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops.. this should not have happened (@.myself). The reason why it could is that react-reload
has no test-case in run_test.go
.
|
||
COPY package* ./ | ||
RUN npm install | ||
COPY src . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
COPY src . | |
COPY src src/ |
Otherwise docker flattens the directory at the destination. And in the package.json
the main file is src/index.js
. I think it only works by accident, because node looks for index.js
in the root folder if the entrypoint is not found.
The other examples are fine, because they use COPY . .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the idea was to flatten the directory. in the skaffold.yaml, sync is configured to strip the src/
prefix.
I'll fix the package.json
though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this examples face-lift. Looks very nice overall. There's one nit and the following bigger issue:
All these examples are not run during integration tests (run_test.go
):
examples/compose
examples/helm-deployment-dependencies
examples/hot-reload
examples/jib
examples/jib-multimodule
examples/kustomize
examples/react-reload
At least for react-reload
I can say that I simply didn't know that a test-case needed to be added. Should we do that? Could also be another PR, because this one is already quite large.
Signed-off-by: David Gageot <[email protected]>
The sample currently doesn’t work Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Signed-off-by: David Gageot <[email protected]>
Good point. I'll push a PR to test more samples (not sure it's easy to test them all) after this PR is merged. |
Signed-off-by: David Gageot <[email protected]>
@dgageot LGTM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice, thanks @dgageot
sync
configuration onhot-reload
sampleskaffold.yaml
files with regards to deploy config.