Always deploy artifact of file.File type

376 views Asked by At

DeployIt has file.File tag (http://docs.xebialabs.com/releases/3.9/deployit/filePluginManual.html) which has checksum attribute. In our deploy manifest file we have provided a checksum value. When deploying the file, deployIt successfully deployed it first time. On the next deployment it skipped deploying the file, which I believe is doing because checksum is not updated.

<file.File name="Create File" file="xyz.jar">
  <tags>
    <value>DomainServer</value>
  </tags>
  <scanPlaceholders>false</scanPlaceholders>
  <checksum>45466d0181c11f06f266802bde5416c4df2532</checksum>
  <targetPath>/dataUpload/</targetPath>
  <createTargetPath>true</createTargetPath>
  <targetFileName>abc.jar</targetFileName>
</file.File>

We would like to deploy this file only when it changes and hence we will need to update the checksum in the deployit manifest file which is not desirable.

What would be our best option?

  1. Write a program to calculate the checksum and update the manifest file? If so, is there any ant script that can do this?
  2. Always deploy (less desirable but an option)
  3. Any better option where DeployIt deploys only when the file has changed?
1

There are 1 answers

0
Hiery Nomus On BEST ANSWER

If you leave the checksum empty in your manifest file, deployit will actually calculate it itself, relieving you of the burden of needing to calculate and update it. It will then correctly detect whether the file has been changed. Also see the documentation