Levant deploy command does not re-deploy

Hi Team,

Issue: ‘Levant deploy’ command does not re-deploy the java code even if there are code changes in the java files. It only deploys the code if we change the Nomad job specification file (*.nomad).
I tried “-ignore-no-changes=true” & “-force=true” options also.

With the help of these options the command out shows that application has been deployed successfully but on Nomad UI i do not see any new allocations.

Could anyone suggest why it is so or am I missing something from my side ?

Hi @sanjesh1000.

Are you versioning the object which contains the Java code? If not, I would suggest tagging the artifacts using tags or naming such as v1.13.21 and incrementing on each build. If this is a development environment, you could even use the Git commit SHA.

Nomad uses the job specification to determine whether a job has changed and does not have ways to identify whether a Java jar or Docker container have been modified natively. This is because artifacts are downloaded by the client, and in order to perform this kind of check, Nomad would need to perform the whole scheduling and placement process before it could identify whether the job has truly changed.

jrasell and the Nomad team

Thanks jrasell.
We are adding current build_id (ADO build id) in job specification so that pipeline deploys the job. And this works for me.