Beispiel #1
0
 CreateClone(string cloneName, string deployName, string branchName, string repoUrl, string imagePath, string destPath, string username, string password)
 {
     // FIXME: implement image
     if (cloneName != null)
     {
         // if deployment requested or image path is provided
         if (imagePath != null || deployName != null)
         {
             PyRevitClones.DeployFromImage(
                 cloneName,
                 deploymentName: deployName,
                 branchName: branchName,
                 imagePath: imagePath,
                 destPath: destPath
                 );
         }
         // otherwise clone the full repo
         else
         {
             PyRevitClones.DeployFromRepo(
                 cloneName,
                 deploymentName: deployName,
                 branchName: branchName,
                 repoUrl: repoUrl,
                 destPath: destPath,
                 username: username,
                 password: password
                 );
         }
     }
 }
 CreateClone(string cloneName, string deployName, string branchName, string repoUrl, string imagePath, string destPath, GitInstallerCredentials credentials)
 {
     // FIXME: implement image
     if (cloneName != null)
     {
         // if deployment requested or image path is provided
         if (imagePath != null || deployName != null)
         {
             PyRevitClones.DeployFromImage(
                 cloneName,
                 deploymentName: deployName,
                 branchName: branchName,
                 imagePath: imagePath,
                 destPath: destPath
                 );
         }
         // otherwise clone the full repo
         else
         {
             PyRevitClones.DeployFromRepo(
                 cloneName,
                 deploymentName: deployName,
                 branchName: branchName,
                 repoUrl: repoUrl,
                 destPath: destPath,
                 credentials: credentials
                 );
         }
     }
 }
        public void DeployFromRepo_Deployment_Test()
        {
            var testCloneDeployment = "core";
            var testCloneBranch     = PyRevitLabsConsts.TragetBranch;

            try {
                PyRevitClones.DeployFromRepo(
                    cloneName: testCloneName,
                    deploymentName: testCloneDeployment,
                    branchName: testCloneBranch,
                    repoUrl: null,
                    destPath: TempPath
                    );
            }
            catch (Exception ex) {
                Assert.Fail(ex.Message);
            }
        }
        public void DeployFromRepo_Develop_Test()
        {
            var testCloneBranch = PyRevitLabsConsts.TragetBranch;

            PyRevitClones.DeployFromRepo(
                cloneName: testCloneName,
                deploymentName: null,
                branchName: testCloneBranch,
                repoUrl: null,
                destPath: TempPath
                );

            var clone = PyRevitClones.GetRegisteredClone(testCloneName);

            PyRevitClones.UnregisterClone(clone);

            Assert.IsTrue(clone.IsRepoDeploy);
            Assert.AreEqual(testCloneBranch, clone.Branch);
        }
Beispiel #5
0
        CreateClone(string cloneName, string deployName, string branchName, string repoUrl, string imagePath, string destPath, string username, string password)
        {
            // FIXME: implement image
            if (cloneName != null)
            {
                // report progress
                GlobalConfigs.ReportProgress = true;
                Console.CursorVisible        = false;

                // if deployment requested or image path is provided
                if (imagePath != null || deployName != null)
                {
                    PyRevitClones.DeployFromImage(
                        cloneName,
                        deploymentName: deployName,
                        branchName: branchName,
                        imagePath: imagePath,
                        destPath: destPath
                        );
                }
                // otherwise clone the full repo
                else
                {
                    PyRevitClones.DeployFromRepo(
                        cloneName,
                        deploymentName: deployName,
                        branchName: branchName,
                        repoUrl: repoUrl,
                        destPath: destPath,
                        username: username,
                        password: password
                        );
                }

                GlobalConfigs.ReportProgress = false;
                Console.CursorVisible        = true;
            }
        }