Deployment process modified (?)

I have a project. Each time I try to use it now I get the following message:

Something has changed since this snapshot was taken.
Deployment Process modified (audit trail): For consistency, this deployment will use a snapshot of the variables and deployment process that was taken when the release was created, which does not include the latest changes that have been made to the project. A changed process can only be incorporated by creating a new release (this one may be renamed if desired).

I am trying to deploy a package that was created only a few minutes ago. NOTHING about the project has been changed, it just always complains.

Is there some way to purge bogus snapshots from Octopus so that the releases use updated data?

Thanks in advance.

It looks like cloning the project will prevent the stale snapshot from being re-used.

I hate to have to clone projects when this happens though. I need to keep the history of releases under one project.

Hey @iancwright,

This looks to be similar to this bug: Notes attribute on Step Process is not copied to Process snapshot · Issue #6719 · OctopusDeploy/Issues · GitHub

Does this look to be the same issue you’re experiencing? Which version are you currently running?

Please let me know what you think.

Best,
Jeremy

Thank you Jeremy!

Yes, I had added a note to a process step. I am using Octopus 9.0.1.0

You’re very welcome!

If you click your user name in the upper right when in the Octopus Portal, you should see the Octopus Server version. If you’re below 2020.6.4722 or 2021.1, upgrading to the latest version in 2020.6 or 2021.1 should hopefully fix this for you.

Please let me know how it goes if you have time or if you have any questions.

Best,
Jeremy

I found an easier way to do this staying with Powershell. Wasn’t a fan of the impersonation approach at all even though it may handle certain use cases. Dunno.

The single tentacle can push a module and invoke it on a remote machine using the following code. The password and username stuff is supplied as project variables. I stored the script module in the module library of Octopus and just move it over to the machine as a temp file that gets imported.

The tentacle where this runs must be set up with an account that can reach out to other target machines. In our case, we use a dedicated service account and have configured it as a local admin on certain boxes we manage.

$securePassword = ConvertTo-SecureString $Password -AsPlainText -Force;
$credential = New-Object System.Management.Automation.PSCredential ($UserName, $securePassword);

$session = New-PSSession -ComputerName $ComputerName -Credential $credential;

$securePassword = ConvertTo-SecureString $Password -AsPlainText -Force;
$credential = New-Object System.Management.Automation.PSCredential ($UserName, $securePassword);

$session = New-PSSession -ComputerName $ComputerName -Credential $credential;

# These values MUST be set in the current session for the $using statement to work...
$serviceName = $ServiceName;
$logLevel = $LoggingLevel;

$serilogModule = @'
#{Octopus.Script.Module[SerilogJsonFileConfig]}
'@

Invoke-Command -Session $session -ScriptBlock {

	$_serilogModuleScript = $using:serilogModule;
    $_serviceName = $using:serviceName;
    $_logLevel = $using:logLevel;
    
    $tempFolder = ${env:TEMP};
    $fileName = [System.IO.Path]::GetFileNameWithoutExtension((New-TemporaryFile).Name);
    $fileName =  "SerilogJsonFileConfig_{0}.psm1" -f $fileName;
    
    Write-Host "`$fileName: $fileName";
    
    $serilogModulePath = (Join-Path -Path $tempFolder -ChildPath $fileName);
    
    Write-Host "`$serilogModulePath: $serilogModulePath";
    
    $_serilogModuleScript | Out-File -FilePath "$serilogModulePath" -Encoding UTF8;	 
    
    Write-Host "SerilogJsonFileConfig module contents written to disk at `"$serilogModulePath`"";
    
    Write-Host (Get-Content -Path $serilogModulePath);
        
	Import-Module -Name "$serilogModulePath" -PassThru;
    
    $service = Get-CimInstance win32_service `
      | Where-Object -Property Name -eq $_serviceName `
      | Select-Object Name, DisplayName, @{N = "Path"; E = { [System.IO.Path]::GetDirectoryName($_.PathName.Replace('"', ''))}};
      
    if ($null -eq $service) {
    	throw "`"$_serviceName`" was not found on ${env:computername}.";
        exit;
    }
    
    Write-Host "Service application directory is `"$($service.Path)`"";
    Write-Host "`$_logLevel: $_logLevel";
      
    Set-SerilogLogLevel -LogLevel $_logLevel -ApplicationPath "$($service.Path)";
}

Hey @iancwright,

Thanks for updating the thread with your solution for others and for letting me know you’re in a good state.

I hope you have a great weekend.

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.