Search code examples
javadeploymentconfigurationantsap-commerce-cloud

How to include patches in hybris with ant updatesystem?


I want to automate the hac update of Hybris via commandline with ant updatesystem.

Based on this question i found out, i could automate the "hac update" based on a config file.

I was able to create such a file by using the "Dump configuration" button in the hac. However i want to import some patches, too. Unfortunately all my patches are explicitly listed with an ID.

{
  "init": "Go",
  "initmethod": "update",
  "localizetypes": "true",
  "mypatches_sample": "true",
  [...]
  "patch_mypatches": [
    "ae2dbba4cbb3fc5b0c374f1717533d8f",
    "67acedd074c6e4af0e09624aee71ca3a",
    "188b121a90671ca65088260a391708c5",
    "b622ef7314e68822b7bf9d6a5b20358d"
  ],
  "filteredPatches": "true"
}

How can i edit the config file to always use all available patches? SAP help page just shows how to create a config file via the dump button...

I tired to set patch_mypatches to "true" or "all" with no effect. I also marked a patch as required. But as long as i don't define the patch ids no patch will be used.


Solution

  • I've just found the solution for this Problem:

    Instead of adding "patch_mypatches": [...] and "filteredPatches":"true"

    i just had to add "patches": "true"

    For example:

    {
      "init": "Go",
      "initmethod": "update",
      "localizetypes": "true",
      "mypatches_sample": "true",
      [...]
      "patches": "true"
    }
    

    Now all patches are applied when executing ant updatesystem -DconfigFile=conf.json