Skip to content

Add artifact cache to track artifacts for faster restart #1632

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

Merged
merged 27 commits into from
Feb 28, 2019
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions cmd/skaffold/app/cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ func AddRunDevFlags(cmd *cobra.Command) {
cmd.Flags().StringVarP(&opts.Namespace, "namespace", "n", "", "Run deployments in the specified namespace")
cmd.Flags().StringVarP(&opts.DefaultRepo, "default-repo", "d", "", "Default repository value (overrides global config)")
cmd.Flags().BoolVar(&opts.SkipTests, "skip-tests", false, "Whether to skip the tests after building")
cmd.Flags().BoolVar(&opts.CacheArtifacts, "cache-artifacts", true, "Set to false to disable caching of artifacts.")
cmd.Flags().StringVarP(&opts.CacheFile, "cache-file", "", "", "Specify the location of the cache file (default $HOME/.skaffold/cache)")
}

func SetUpLogs(out io.Writer, level string) error {
Expand Down
20 changes: 20 additions & 0 deletions docs/content/en/docs/references/cli/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ Usage:

Flags:
-b, --build-image stringArray Choose which artifacts to build. Artifacts with image names that contain the expression will be built only. Default is to build sources for all artifacts
--cache-artifacts Set to false to disable caching of artifacts. (default true)
--cache-file string Specify the location of the cache file (default $HOME/.skaffold/cache)
-d, --default-repo string Default repository value (overrides global config)
-f, --filename string Filename or URL to the pipeline file (default "skaffold.yaml")
-n, --namespace string Run deployments in the specified namespace
Expand All @@ -83,6 +85,8 @@ Global Flags:
Env vars:

* `SKAFFOLD_BUILD_IMAGE` (same as --build-image)
* `SKAFFOLD_CACHE_ARTIFACTS` (same as --cache-artifacts)
* `SKAFFOLD_CACHE_FILE` (same as --cache-file)
* `SKAFFOLD_DEFAULT_REPO` (same as --default-repo)
* `SKAFFOLD_FILENAME` (same as --filename)
* `SKAFFOLD_NAMESPACE` (same as --namespace)
Expand Down Expand Up @@ -142,6 +146,8 @@ Usage:
skaffold delete [flags]

Flags:
--cache-artifacts Set to false to disable caching of artifacts. (default true)
--cache-file string Specify the location of the cache file (default $HOME/.skaffold/cache)
-d, --default-repo string Default repository value (overrides global config)
-f, --filename string Filename or URL to the pipeline file (default "skaffold.yaml")
-n, --namespace string Run deployments in the specified namespace
Expand All @@ -157,6 +163,8 @@ Global Flags:
```
Env vars:

* `SKAFFOLD_CACHE_ARTIFACTS` (same as --cache-artifacts)
* `SKAFFOLD_CACHE_FILE` (same as --cache-file)
* `SKAFFOLD_DEFAULT_REPO` (same as --default-repo)
* `SKAFFOLD_FILENAME` (same as --filename)
* `SKAFFOLD_NAMESPACE` (same as --namespace)
Expand All @@ -173,6 +181,8 @@ Usage:
skaffold deploy [flags]

Flags:
--cache-artifacts Set to false to disable caching of artifacts. (default true)
--cache-file string Specify the location of the cache file (default $HOME/.skaffold/cache)
-d, --default-repo string Default repository value (overrides global config)
-f, --filename string Filename or URL to the pipeline file (default "skaffold.yaml")
--images strings A list of pre-built images to deploy
Expand All @@ -191,6 +201,8 @@ Global Flags:
```
Env vars:

* `SKAFFOLD_CACHE_ARTIFACTS` (same as --cache-artifacts)
* `SKAFFOLD_CACHE_FILE` (same as --cache-file)
* `SKAFFOLD_DEFAULT_REPO` (same as --default-repo)
* `SKAFFOLD_FILENAME` (same as --filename)
* `SKAFFOLD_IMAGES` (same as --images)
Expand All @@ -210,6 +222,8 @@ Usage:
skaffold dev [flags]

Flags:
--cache-artifacts Set to false to disable caching of artifacts. (default true)
--cache-file string Specify the location of the cache file (default $HOME/.skaffold/cache)
--cleanup Delete deployments after dev mode is interrupted (default true)
-d, --default-repo string Default repository value (overrides global config)
--experimental-gui Experimental Graphical User Interface
Expand All @@ -233,6 +247,8 @@ Global Flags:
```
Env vars:

* `SKAFFOLD_CACHE_ARTIFACTS` (same as --cache-artifacts)
* `SKAFFOLD_CACHE_FILE` (same as --cache-file)
* `SKAFFOLD_CLEANUP` (same as --cleanup)
* `SKAFFOLD_DEFAULT_REPO` (same as --default-repo)
* `SKAFFOLD_EXPERIMENTAL_GUI` (same as --experimental-gui)
Expand Down Expand Up @@ -331,6 +347,8 @@ Usage:
skaffold run [flags]

Flags:
--cache-artifacts Set to false to disable caching of artifacts. (default true)
--cache-file string Specify the location of the cache file (default $HOME/.skaffold/cache)
-d, --default-repo string Default repository value (overrides global config)
-f, --filename string Filename or URL to the pipeline file (default "skaffold.yaml")
-l, --label stringArray Add custom labels to deployed objects. Set multiple times for multiple labels.
Expand All @@ -349,6 +367,8 @@ Global Flags:
```
Env vars:

* `SKAFFOLD_CACHE_ARTIFACTS` (same as --cache-artifacts)
* `SKAFFOLD_CACHE_FILE` (same as --cache-file)
* `SKAFFOLD_DEFAULT_REPO` (same as --default-repo)
* `SKAFFOLD_FILENAME` (same as --filename)
* `SKAFFOLD_LABEL` (same as --label)
Expand Down
Loading