Problem : As an audit requirement we need to compare an application folders contents in say “Staging” to a deployment in “Production”. Only config files should be different if deploying the same version.
Proposed solution: As a step in deployment use md5deep http://md5deep.sourceforge.net/ (or other md5 command line tool) to create a text file of the files and their md5 at the end of the deploy. Then in the next downstream deployment compare the new text file to the previous file which is stored as an artifact.
Question: Can you access directly artifacts from within a step from an different environment but the same version and project. Or is there a different approach to the problem?
Thanks for getting in touch! Artifacts could work. Artifacts are stored on the server so you know the path, then you can create the artifact with environment and release. So using that information you can build the path and name to the artifact pretty easily.
This would be easier than having to go into the API to get previous artifacts if you can always assume you create one on staging to be accessed by production. And now that you can run scripts directly on the Octopus Server the files are easily accessible.
Let me know if you would like me to expand on any of this information.
Hope that helps!
I’ve used New-OctopusArtifact -Path $outFileName -Name $outFileName to store my artifacts but the artifact is being stored on disk as “Artifacts-N”.
This then blocks me linking back with the structured file name. The UI displays the name correctly. Is there a way of access an artifact on disk or indirectly using the -Name given to the New-OctopusArtifact ?
Deep apologies for the absurd delay here. Hopefully my reply is worth the waiting.
** Is there a way of access an artifact on disk or indirectly using the -Name given to the New-OctopusArtifact ?**
Not out of the box, but I’ve prepared a script for you to do this. All you’ll need to do is know the name of the artifact you want to download.
Check the script on the gist below and let me know if something doesn’t make sense. I promise that this time I’ll reply within the day.