@@ -27,6 +27,7 @@ import (
2727 "github.com/SovereignCloudStack/csctl/pkg/github"
2828 "github.com/SovereignCloudStack/csctl/pkg/github/client"
2929 "github.com/SovereignCloudStack/csctl/pkg/hash"
30+ "github.com/SovereignCloudStack/csctl/pkg/providerplugin"
3031 "github.com/SovereignCloudStack/csctl/pkg/template"
3132 "github.com/spf13/cobra"
3233 "gopkg.in/yaml.v3"
@@ -91,6 +92,11 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
9192 createOption .ClusterStackPath = clusterStackPath
9293 createOption .Config = config
9394
95+ _ , _ , err = providerplugin .GetProviderExecutable (& config )
96+ if err != nil {
97+ return createOption , fmt .Errorf ("providerplugin.GetProviderExecutable(&config) failed: %w" , err )
98+ }
99+
94100 currentHash , err := hash .GetHash (clusterStackPath )
95101 if err != nil {
96102 return nil , fmt .Errorf ("failed to get hash: %w" , err )
@@ -109,7 +115,7 @@ func GetCreateOptions(ctx context.Context, clusterStackPath string) (*CreateOpti
109115 return nil , fmt .Errorf ("failed to create new github client: %w" , err )
110116 }
111117
112- // update the metadata kubernetes version with the csmctl .yaml config
118+ // update the metadata kubernetes version with the csctl .yaml config
113119 createOption .Metadata .Versions .Kubernetes = config .Config .KubernetesVersion
114120
115121 latestRepoRelease , err := github .GetLatestReleaseFromRemoteRepository (ctx , mode , & config , gc )
@@ -189,7 +195,7 @@ func (c *CreateOptions) generateRelease() error {
189195 if err := os .MkdirAll (c .ClusterStackReleaseDir , os .ModePerm ); err != nil {
190196 return fmt .Errorf ("failed to create output directory: %w" , err )
191197 }
192-
198+ fmt . Printf ( "Creating output in %s \n " , c . ClusterStackReleaseDir )
193199 // Write the current hash
194200 hashJSONData , err := json .MarshalIndent (c .CurrentReleaseHash , "" , " " )
195201 if err != nil {
@@ -244,5 +250,9 @@ func (c *CreateOptions) generateRelease() error {
244250 return fmt .Errorf ("failed to write metadata: %w" , err )
245251 }
246252
253+ err = providerplugin .CreateNodeImages (& c .Config , c .ClusterStackPath , c .ClusterStackReleaseDir )
254+ if err != nil {
255+ return fmt .Errorf ("providerplugin.CreateNodeImages() failed: %w" , err )
256+ }
247257 return nil
248258}
0 commit comments