Change bootstrap bundle entrypoint to phase dir

Change-Id: I85151f42e510eb113bcc3bb86d56043d51bf348a
Relates-To: #175
This commit is contained in:
Kostiantyn Kalynovskyi 2020-04-16 19:31:38 -05:00
parent e9f8ac3ac3
commit da2799bee3
13 changed files with 8 additions and 7 deletions

View File

@ -0,0 +1,2 @@
resources:
- ../../../../type/test-bootstrap

View File

@ -1,2 +0,0 @@
resources:
- ../../../type/test-bootstrap

View File

@ -54,7 +54,7 @@ func GenerateBootstrapIso(settings *environment.AirshipCTLSettings) error {
// TODO (dukov) replace with the appropriate function once it's available
// in document module
root, err := globalConf.CurrentContextEntryPoint(config.Ephemeral, "")
root, err := globalConf.CurrentContextEntryPoint(config.Ephemeral, config.BootstrapPhase)
if err != nil {
return err
}

View File

@ -59,7 +59,7 @@ func (mc *mockContainer) GetID() string {
}
func TestBootstrapIso(t *testing.T) {
bundle, err := document.NewBundleByPath("testdata/primary/site/test-site/ephemeral")
bundle, err := document.NewBundleByPath("testdata/primary/site/test-site/ephemeral/bootstrap")
require.NoError(t, err, "Building Bundle Failed")
tempVol, cleanup := testutil.TempDir(t, "bootstrap-test")

View File

@ -69,7 +69,7 @@ func (infra *Infra) Deploy() error {
return err
}
kustomizePath, err := globalConf.CurrentContextEntryPoint(infra.ClusterType, config.Initinfra)
kustomizePath, err := globalConf.CurrentContextEntryPoint(infra.ClusterType, config.InitinfraPhase)
if err != nil {
return err
}

View File

@ -24,7 +24,8 @@ const (
// Constants related to Phases
const (
Initinfra = "initinfra"
InitinfraPhase = "initinfra"
BootstrapPhase = "bootstrap"
)
// AllClusterTypes holds cluster types

View File

@ -98,7 +98,7 @@ func (a *Adapter) initializeAdapter(settings *environment.AirshipCTLSettings) er
return config.ErrMissingConfig{What: "RemoteDirect options not defined in bootstrap config"}
}
bundlePath, err := cfg.CurrentContextEntryPoint(config.Ephemeral, "")
bundlePath, err := cfg.CurrentContextEntryPoint(config.Ephemeral, config.BootstrapPhase)
if err != nil {
return err
}