[ https://issues.apache.org/jira/browse/NIFIREG-160?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16429481#comment-16429481 ]
ASF GitHub Bot commented on NIFIREG-160: ---------------------------------------- GitHub user pvillard31 opened a pull request: https://github.com/apache/nifi-registry/pull/110 NIFIREG-160 - WIP - Hook provider To test it quickly, you can do the following changes: ./conf/providers.xml ````xml <providers> <flowPersistenceProvider> <class>org.apache.nifi.registry.provider.flow.FileSystemFlowPersistenceProvider</class> <property name="Flow Storage Directory">./flow_storage</property> </flowPersistenceProvider> <flowHookProvider> <class>org.apache.nifi.registry.provider.hook.ScriptFlowHookProvider</class> <property name="Script Path">/tmp/test.sh</property> <property name="Working Directory"></property> </flowHookProvider> </providers> ```` /tmp/test.sh ````bash #!/bin/bash echo $@ >> /tmp/registryHook.log ```` We can see this kind of ouput: ```` CREATE_BUCKET a50f3aac-a3b6-47ed-b0b0-eb7a1c0cb8b5 CREATE_VERSION 7091404e-1295-4d03-9053-06f2ecb83f91 707b31c8-6741-4525-9816-bd188f1f96eb 2 a comment anonymous DELETE_BUCKET a50f3aac-a3b6-47ed-b0b0-eb7a1c0cb8b5 CREATE_BUCKET 95c7d15a-2ac8-494e-841a-c168e19c1c35 CREATE_BUCKET 2326a164-7ab3-45a3-af66-4adbf2cd4f32 DELETE_BUCKET 95c7d15a-2ac8-494e-841a-c168e19c1c35 DELETE_BUCKET 2326a164-7ab3-45a3-af66-4adbf2cd4f32 ```` You can merge this pull request into a Git repository by running: $ git pull https://github.com/pvillard31/nifi-registry hook Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi-registry/pull/110.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #110 ---- commit 4d7d8d21f211d646def86271a9b69c2633f9adf9 Author: Pierre Villard <pierre.villard.fr@...> Date: 2018-04-06T14:58:33Z NIFIREG-160 - WIP - Hook provider ---- > Implement a hook provider > ------------------------- > > Key: NIFIREG-160 > URL: https://issues.apache.org/jira/browse/NIFIREG-160 > Project: NiFi Registry > Issue Type: New Feature > Reporter: Pierre Villard > Priority: Major > > In order to extend NiFi Registry and NiFi CLI features to integrate with > automated deployment pipelines, it would be useful to provide a hook > extension point that can be configured by users to trigger actions when a new > flow snapshot version is committed in the Registry. > A first implementation of this extension point could be a "script hook": a > script would be executed when a new flow snapshot version is committed. > Arguments passed to the script would be: bucket ID, flow ID, version, author > and comment. > This would enable a lot of scenarios including automatically deploy flows > from one environment to another. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)