public void ShouldAddVariablesIfPreviousSuccessfulInstallation()
 {
     previous = new JournalEntry("123", "tenant", "env", "proj", "rp01", DateTime.Now, "C:\\App", "C:\\MyApp", true,
                                 new List <DeployedPackage> {
         new DeployedPackage("pkg", "0.0.9", "C:\\PackageOld.nupkg")
     });
     DeploymentJournalVariableContributor.PreviousSuccessful(variables, journal, "123");
     Assert.That(variables.Get(TentacleVariables.PreviousSuccessfulInstallation.OriginalInstalledPath), Is.EqualTo("C:\\App"));
 }
Esempio n. 2
0
        public IVariables Create(CommonOptions options)
        {
            var variables = new CalamariVariables();

            ReadUnencryptedVariablesFromFile(options, variables);
            ReadEncryptedVariablesFromFile(options, variables);
            ReadOutputVariablesFromOfflineDropPreviousSteps(options, variables);

            AddEnvironmentVariables(variables);
            variables.Set(TentacleVariables.Agent.InstanceName, "#{env:TentacleInstanceName}");
            ReadAdditionalVariablesFromFile(variables);
            DeploymentJournalVariableContributor.Contribute(fileSystem, variables);

            return(variables);
        }
 public void ShouldAddEmptyVariablesIfNoPreviousSuccessfulInstallation()
 {
     previous = null;
     DeploymentJournalVariableContributor.PreviousSuccessful(variables, journal, "123");
     Assert.That(variables.Get(TentacleVariables.PreviousSuccessfulInstallation.OriginalInstalledPath), Is.EqualTo(""));
 }