コード例 #1
0
        public void AfterDeployment(PortalBase application, BackgroundWorker worker, object deployment)
        {
            // log to output window
            var log = ApplicationContext.Current.Services.Get <IOutputWindowService>().Get("default");

            log.LogInformation("INFO  - Running After Deployment action from " + Name);

            // get current connection to saleslogix database if needed
            var dataService = ApplicationContext.Current.Services.Get <IDataService>();

            // iterate through the targets for the deployment
            foreach (var target in (deployment as Sage.Platform.Deployment.Deployment).Targets.Where(x => x.IsActive))
            {
                // locate the matching portal for this target
                var targetPortal = target.Portals.FirstOrDefault(x => x.PortalApp.PortalAlias == application.PortalAlias);
                if (targetPortal == null)
                {
                    continue;
                }

                // Now you can do whatever you need with the details for this portal deployment

                // Deployment directory
                var deployFolder = target.GetFolderName(targetPortal);

                // Current connection string to database
                var connString = dataService.GetConnectionString();
            }
        }
コード例 #2
0
        public IShadowCopyItem[] GetDeployableItems(PortalBase portal, BackgroundWorker worker)
        {
            // CREATE FILES TO DEPLOY TO THE TARGET FOLDER HERE

            // if you don't want to deploy any files to the target reutrn an empty array
            // return new IShadowCopyItem[0];

            // create a memory stream with the contents of the file to write to the deployment folder
            var stream = new MemoryStream();
            var writer = new StreamWriter(stream, Encoding.UTF8, 0x200);

            writer.Write("DEPLOYED " + DateTime.Now + ": This is the contents of the file I am wrting out to the deployment folder");
            writer.Flush(); // flush streamwriter to the stream

            // return the array of ShadowCopyItems, you can add as many files to this array as you need
            return(new IShadowCopyItem[] { new ShadowCopyItem("_mysamplefile.txt", stream) });
        }
コード例 #3
0
        public string GetAPIURL(string churchId)
        {
            string returnValue = string.Empty;

            // If the realm is not empty, append a slash
            if (!string.IsNullOrEmpty(this._realm))
            {
                this._realm = this._realm + "/";
            }

            switch (this._f1Environment)
            {
            case F1Environments.LOCAL:
                break;

            /* case F1Environments.DEV:
             *   returnValue = string.Format("http://{0}.api.dev.corp.local/{1}{2}/", this._churchcode, this._realm, "v1");
             *   break;
             * case F1Environments.QA:
             *   returnValue = string.Format("http://{0}.apiqa.dev.corp.local/{1}{2}/", this._churchcode, this._realm, "v1");
             *   break;
             * case F1Environments.DEV1:
             * case F1Environments.DEV2:
             * case F1Environments.DEV3:
             *   break;
             * case F1Environments.INTEGRATION:
             *   break;
             * case F1Environments.STAGING:
             *   returnValue = string.Format("https://{0}.staging.fellowshiponeapi.com/{1}{2}/", this._churchcode, this._realm, "v1");
             *   break; */

            case F1Environments.LV_QA:
            case F1Environments.LV_UAT:
            case F1Environments.STAGING:
            case F1Environments.INT:
            case F1Environments.INT2:
            case F1Environments.INT3:
            case F1Environments.LV_PROD:
                //v1/people or people/v1 or peoplev1
                returnValue = string.Format("https://{0}.{1}.fellowshiponeapi.com/{2}{3}/", churchId, PortalBase.GetLVEnvironment(this._f1Environment), this._realm, "v1");
                break;

            default:
                throw new Exception("Not a valid environment!!");
            }

            TestLog.WriteLine("URL: " + returnValue);
            return(returnValue);
        }
コード例 #4
0
 public void SetupDeployment(DirectoryEntry virtualDirectory, PortalBase application, BackgroundWorker worker)
 {
 }
コード例 #5
0
 public void BeforeDeployment(PortalBase application, BackgroundWorker worker)
 {
 }