private void Initialise(TArgument argument) { var context = new InitialiseProjectContext { PrivateVariables = new Dictionary <string, string>(), PublicVariables = new Dictionary <string, string>() }; context.PrivateVariables.Add("MsSql.SaPassword", NonceService.Generate()); context.PrivateVariables.Add("Sitecore.License", CreateEncodedSitecoreLicense(argument)); context.PrivateVariables.Add("Sitecore.TelerikEncryptionKey", NonceService.Generate()); context.MetaData.Add("SitecoreVersion", Version); context.MetaData.Add(Constants.MetaData.SitecoreTopology, argument.Topology); context.WorkingPath = argument.WorkingPath; context.SourceCodePath = argument.SourceCodePath; context.Name = argument.Name; if (!string.IsNullOrEmpty(argument.DockerComposeTemplate)) { context.DockerComposeFilePath = argument.DockerComposeTemplate; } else { context.DockerComposeFilePath = Path.Join(TemplatePath, $"{argument.Topology}.template.docker-compose.yml"); } if (!string.IsNullOrEmpty(argument.DockerComposeTemplate)) { context.EnvironmentTemplateFilePath = argument.EnvironmentTemplate; } else { context.EnvironmentTemplateFilePath = Path.Join(TemplatePath, $"{argument.Topology}.template.env"); } DoInitialise(argument, context); InitialiseProjectPipeline.Execute(context); }
protected override void DoInitialise(SitecoreInitialiseArgument argument, InitialiseProjectContext context) { var identityCertificatePassword = NonceService.Generate(); var identityCertificate = _certificateService.CreateSelfSignedCertificate("dimmy.sitecore.plugin", "localhost"); var x509IdentityCertificate2Export = identityCertificate.Export(X509ContentType.Pfx, identityCertificatePassword); var x509IdentityCertificate2Base64String = Convert.ToBase64String(x509IdentityCertificate2Export); context.PublicVariables.Add("DevelopmentHelper.HookName", argument.DevelopmentHelperHookName); context.PrivateVariables.Add("Sitecore.AdminPassword", NonceService.Generate()); context.PrivateVariables.Add("Sitecore.MediaRequestProtectionSharedSecret", NonceService.Generate()); context.PrivateVariables.Add("Sitecore.Id.Secret", NonceService.Generate()); context.PrivateVariables.Add("Sitecore.Id.CertificatePassword", identityCertificatePassword); context.PrivateVariables.Add("Sitecore.Id.Certificate", x509IdentityCertificate2Base64String); context.PrivateVariables.Add("Sitecore.Rep.ApiKey", NonceService.Generate()); context.PrivateVariables.Add("Sitecore.Xc.Engine.Authoring.ClientId", NonceService.Generate()); context.PublicVariables.Add("Sitecore.Id.HostName", argument.IdHostName); context.PublicVariables.Add("Sitecore.Cd.HostName", argument.CdHostName); context.PublicVariables.Add("Sitecore.Cm.HostName", argument.CmHostName); context.PublicVariables.Add("WindowsVersion", argument.WindowsVersion); context.PublicVariables.Add("Sitecore.Xc.GlobalTrustedConnection", argument.XcGlobalTrustedConnection.ToString()); context.PublicVariables.Add("Sitecore.Xc.SharedTrustedConnection", argument.XcSharedTrustedConnection.ToString()); context.PublicVariables.Add("Sitecore.Xc.Engine.GlobalDatabaseName", argument.XcEngineGlobalDatabaseName); context.PublicVariables.Add("Sitecore.Xc.Engine.SharedDatabaseName", argument.XcEngineSharedDatabaseName); context.PublicVariables.Add("Sitecore.Xc.Braintree.Environment", argument.XcBraintreeEnvironment); context.PublicVariables.Add("Sitecore.Xc.Braintree.MerchantId", argument.XcBraintreeMerchantId); context.PublicVariables.Add("Sitecore.Xc.Braintree.PublicKey", argument.XcBraintreePublicKey); context.PublicVariables.Add("Sitecore.Xc.Braintree.PrivateKey", argument.XcBraintreePrivateKey); }