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

chore: add new config to control the pull behaviour for verify #9150

Merged
merged 2 commits into from
Oct 27, 2023

Conversation

renzodavid9
Copy link
Contributor

@renzodavid9 renzodavid9 commented Oct 24, 2023

Fixes: #9148

Description
This PR adds a new config field for local verify test cases to force the use of a local image if one exists, if it doesn't exists it will trigger a pull.

How to test the change
With the following skaffold.yaml file:

apiVersion: skaffold/v4beta8
kind: Config
verify:
- name: with-local-img
  executionMode:
    local:
      useLocalImages: true
  container:
    name: gcloud
    image: gcr.io/cloud-builders/gcloud:latest
    command: ["/bin/bash"]
    args: ["-c", "gcloud version"]

Execute skaffold verify. You'll notice that the image is pull from the registry before running the container. Now if you run skaffold verify again, you'll see that Skaffold is not trying to pull the image again from the registry.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #9150 (016ff62) into main (290280e) will decrease coverage by 6.79%.
Report is 1050 commits behind head on main.
The diff coverage is 48.33%.

@@            Coverage Diff             @@
##             main    #9150      +/-   ##
==========================================
- Coverage   70.48%   63.69%   -6.79%     
==========================================
  Files         515      630     +115     
  Lines       23150    32429    +9279     
==========================================
+ Hits        16317    20656    +4339     
- Misses       5776    10186    +4410     
- Partials     1057     1587     +530     
Files Coverage Δ
cmd/skaffold/app/cmd/commands.go 97.61% <100.00%> (+0.35%) ⬆️
cmd/skaffold/app/cmd/config.go 100.00% <100.00%> (ø)
cmd/skaffold/app/cmd/config/list.go 65.21% <ø> (ø)
cmd/skaffold/app/cmd/config/set.go 88.72% <ø> (ø)
cmd/skaffold/app/cmd/config/util.go 54.28% <ø> (ø)
cmd/skaffold/app/cmd/credits.go 100.00% <ø> (ø)
cmd/skaffold/app/cmd/debug.go 100.00% <100.00%> (ø)
cmd/skaffold/app/cmd/flags.go 93.00% <100.00%> (+2.18%) ⬆️
cmd/skaffold/app/cmd/generate_pipeline.go 60.00% <ø> (ø)
cmd/skaffold/app/cmd/init.go 100.00% <100.00%> (ø)
... and 41 more

... and 434 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@pull-request-size pull-request-size bot added size/L and removed size/S labels Oct 25, 2023
@renzodavid9 renzodavid9 changed the title chore: add new config to control the pull behaviour for verify to che… chore: add new config to control the pull behaviour for verify Oct 25, 2023
@renzodavid9 renzodavid9 marked this pull request as ready for review October 25, 2023 14:19
Copy link
Contributor

@aaron-prindle aaron-prindle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@renzodavid9 renzodavid9 merged commit d47c33d into GoogleContainerTools:main Oct 27, 2023
15 checks passed
@renzodavid9 renzodavid9 deleted the verify-cache branch October 27, 2023 15:08
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.

[Verify] New config option to check images in local host before pull
2 participants