Invalidate dispatcher cache after successful Jenkins build - AEM/Adobe CQ5
This post will explain how to invalidate the cache in Adobe Experience Manager after successful Jenkins build.Login to Jenkins console
Open the job and click on configuration
Add post-build step of type “Execute Shell” and select “Run only if build
succeeds”
Enter the below script and click on - Change the dispatcher host name
accordingly.
/usr/bin/curl -H "CQ-Action: DELETE" -H "CQ-Handle:/"
-H "Content-Length: 0" -H "Content-Type:
application/octet-stream" --noproxy .com http://<<dispatcher
host name>>/dispatcher/invalidate.cache
If multiple dispatcher are configured then configure the
dispatchers as shown below in the script.
/usr/bin/curl -H "CQ-Action: DELETE" -H
"CQ-Handle:/" -H "Content-Length: 0" -H "Content-Type:
application/octet-stream" --noproxy .com http://{dispatcher1, dispatcher2,
dispatcher3, dispatcher4}.com/dispatcher/invalidate.cache
No comments:
Post a Comment