Skip to content


feat(export): add introspect and parallel cli options
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Igrychev <>
  • Loading branch information
alexey-igrychev committed Jun 7, 2024
1 parent 45ecd0e commit db20884
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cmd/werf/export/export.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ func NewExportCmd(ctx context.Context) *cobra.Command {
common.SetupCacheStagesStorageOptions(&commonCmdData, cmd)
common.SetupRepoOptions(&commonCmdData, cmd, common.RepoDataOptions{OptionalRepo: true})
common.SetupFinalRepo(&commonCmdData, cmd)
common.SetupParallelOptions(&commonCmdData, cmd, common.DefaultBuildParallelTasksLimit)

common.SetupIntrospectAfterError(&commonCmdData, cmd)
common.SetupIntrospectBeforeError(&commonCmdData, cmd)
common.SetupIntrospectStage(&commonCmdData, cmd)

common.SetupRequireBuiltImages(&commonCmdData, cmd)

Expand Down Expand Up @@ -241,9 +246,14 @@ func run(ctx context.Context, imagesToProcess build.ImagesToProcess, tagTemplate

storageManager := manager.NewStorageManager(projectName, stagesStorage, finalStagesStorage, secondaryStagesStorageList, cacheStagesStorageList, storageLockManager)

buildOptions, err := common.GetBuildOptions(ctx, &commonCmdData, werfConfig, imagesToProcess.OnlyImages)
if err != nil {
return err


conveyorOptions, err := common.GetConveyorOptions(ctx, &commonCmdData, imagesToProcess)
conveyorOptions, err := common.GetConveyorOptionsWithParallel(ctx, &commonCmdData, imagesToProcess, buildOptions)
if err != nil {
return err
Expand Down
26 changes: 26 additions & 0 deletions docs/_includes/reference/cli/
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,27 @@ werf export [IMAGE_NAME...] [options]
configuration (default $WERF_INSECURE_HELM_DEPENDENCIES)
Use plain HTTP requests when accessing a registry (default $WERF_INSECURE_REGISTRY)
Introspect failed stage in the clean state, before running all assembly instructions of
the stage
Introspect failed stage in the state, right after running failed assembly instruction
Introspect a specific stage. The option can be used multiple times to introspect
several stages.

There are the following formats to use:
* specify IMAGE_NAME/STAGE_NAME to introspect stage STAGE_NAME of either image or
artifact IMAGE_NAME
* specify STAGE_NAME or */STAGE_NAME for the introspection of all existing stages with

IMAGE_NAME is the name of an image or artifact described in werf.yaml, the nameless
image specified with ~.
STAGE_NAME should be one of the following: from, beforeInstall,
dependenciesBeforeInstall, gitArchive, install, dependenciesAfterInstall, beforeSetup,
dependenciesBeforeSetup, setup, dependenciesAfterSetup, gitCache, gitLatestPatch,
dockerInstructions, dockerfile
Kubernetes config file path (default $WERF_KUBE_CONFIG, or $WERF_KUBECONFIG, or
Expand Down Expand Up @@ -148,6 +169,11 @@ werf export [IMAGE_NAME...] [options]
Enable verbose output (default $WERF_LOG_VERBOSE).
Loose werf giterminism mode restrictions
-p, --parallel=true
Run in parallel (default $WERF_PARALLEL or true)
Parallel tasks limit, set -1 to remove the limitation (default
Enable platform emulation when building images with werf, format: OS/ARCH[/VARIANT]
Expand Down

0 comments on commit db20884

Please sign in to comment.