mirror of https://github.com/databricks/cli.git
add const for internal
This commit is contained in:
parent
9493795d88
commit
e51b3a17bd
|
@ -79,7 +79,7 @@ func filerForVolume(ctx context.Context, b *bundle.Bundle) (filer.Filer, string,
|
||||||
// If the volume exists already, directly return the filer for the path to
|
// If the volume exists already, directly return the filer for the path to
|
||||||
// upload the artifacts to.
|
// upload the artifacts to.
|
||||||
if err == nil {
|
if err == nil {
|
||||||
uploadPath := path.Join(artifactPath, ".internal")
|
uploadPath := path.Join(artifactPath, InternalDirName)
|
||||||
f, err := filer.NewFilesClient(w, uploadPath)
|
f, err := filer.NewFilesClient(w, uploadPath)
|
||||||
return f, uploadPath, diag.FromErr(err)
|
return f, uploadPath, diag.FromErr(err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,12 @@ import (
|
||||||
"github.com/databricks/cli/libs/filer"
|
"github.com/databricks/cli/libs/filer"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// We upload artifacts to the workspace in a directory named ".internal" to have
|
||||||
|
// a well defined location for artifacts that have been uploaded by the DABs.
|
||||||
|
const InternalDirName = ".internal"
|
||||||
|
|
||||||
func filerForWorkspace(b *bundle.Bundle) (filer.Filer, string, diag.Diagnostics) {
|
func filerForWorkspace(b *bundle.Bundle) (filer.Filer, string, diag.Diagnostics) {
|
||||||
uploadPath := path.Join(b.Config.Workspace.ArtifactPath, ".internal")
|
uploadPath := path.Join(b.Config.Workspace.ArtifactPath, InternalDirName)
|
||||||
f, err := filer.NewWorkspaceFilesClient(b.WorkspaceClient(), uploadPath)
|
f, err := filer.NewWorkspaceFilesClient(b.WorkspaceClient(), uploadPath)
|
||||||
return f, uploadPath, diag.FromErr(err)
|
return f, uploadPath, diag.FromErr(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue