0

I have Jenkins build that reads a file from an Azure DevOps repository and runs a .NET dll that verifies the SHA256 of that file against the SHA256 provided in a manifest file. Unfortunately, Jenkins runs on Linux and does a phantom update to the line endings before processing the file with the piece of .NET code that causes the checksums to mismatch because the checksum in the manifest is calculated in Windows. I have even tried updating manually updating the line endings from \r\n to \n in notepad++ and updating the manifest with the resulting checksum but it is still failing. Does anyone here have a suggestion of how to avoid this discrepancy?

  • "does a phantom update to the line endings". Wouldn't it be better to find out why that is occurring to see if it can be prevented? If it can't be then at least work out more precisely what changes are being made. – kaylum Jan 30 '20 at 21:47

1 Answers1

0

Manually updating the file might not be a good idea, but you could try to apply a line break normalization function. Depending on the technology you are using, there will be most likely a normalization function included. If it's a line break / compatibility problem, this should usually fix it.

  • I appreciate that. The problem is that the people who are updating the manifest file will probably be working on windows and relatively non-technical. It was working fine when I had pipelines in Azure DevOps and they were running the CLI command `certUtil -hashfile SHA256`. Now I need a way for them to find the expected checksum when the file won't be looked at or normalized until later in the process. – Michael Temple Jan 31 '20 at 21:31