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.
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:
* 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.
*** 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 ***
Did you find it helpful?Send feedback