How to deploy a plugin to Bitbucket Server?

Hi there!

I’ve got the Bitbucket Server 6.8.1 installed on Linux machine.
I’ve developed my first plugin -a hook (PreRepositoryHook) on my dev(windows) machine.
It compiled, and the artifact(jar file) was successfully created in the target directory.
Can someone advice what should be the next step? How can I deploy my plugin into the server?

Thank you in advance.

Goto > Admin > Manage apps > Upload > Browse for files

Select the jar from ./target and install.

Check in the Manage apps page if the app was successfully installed.

Happy developing!