Deployment Task

The official Aqua documentation demonstrates how to configure the webhook.config.json file to work against the JFrog Artifactory repository and auto register and scan new images.

With customers today have multiple repositories to support their sub-customers or different business units inside their organization - comes the need to support multiple JFrog Artifactory repositories with the webhook plugin.

Deployment Steps

As documented, configure your webhook.config.json file to work with their webhook.groovy file.

You can enable this solution for more than one repository.

In the example below,  we have two repositories:

  • API Dev Repository - will name it APIDevRep
  • Application Dev Repository - will name is APPDevRep

Now we will create two config files (based on the template of the webhook.config.json) one for each business unit.

For the API Dev unit, we will configure a file called APIDev.config.json

For the APP Dev unit, we will configure a file called APPDev.config.json

Each file points to its needed repository and its Aqua Jfrog Artifactory Integration:

Once done - we will also duplicate the webhook.groovy file to have one per unit.

For the API Dev unit, we will copy the webhook.groovy file to APIDev.groovy file.

For the APP Dev unit, we will copy the webhook.groovy file to APPDev.groovy file.

We will edit each file respectively and modify (for the current 4.2 version) line 708 - which should like this:

        final String CONFIG_FILE_PATH = "${'artifactory.home'}/etc/plugins/webhook.config.json"

  to reflect the related config file. For example, if you have APIDev.config.json file, update line 708 in APIDev.groovy to be like this:

        final String CONFIG_FILE_PATH = "${'artifactory.home'}/etc/plugins/APIDev.config.json

* Repeat this process for every config file you have.

* We recommend doing a simple search for the .groovy file for any mention of 'webhook.config.json' and replace this text with the needed '<new name>.config.json'  This will allow anyone else reading the .groovy file to understand what we did.

- We now ready to stop the Artifactory and copy the new/updated config and .groovy files to the Artifactory etc/plugins folder (make sure you removed the default webhook.config.json and webhook.groovy files). We are ready to support the multiple business units with Aqua and JFrog Artifactory.


*** Sample the attached groovy and config files. Make sure you check when configuring files and test everything in a test environment before moving to production ***