Apache Nifi-registry BitBucket repository? - bitbucket

I am looking for version control repository in BitBucket like GitHub. I have found Nifi Git repository. But at my organization we have private account in BitBucket. My question is can I create version control repository with Apache Nifi-registry in bitbucket? There is a class (org.apache.nifi.registry.provider.flow.git.GitFlowPersistenceProvider) which is associated with Git in the providers.xml file in nifi-registry. For bitbucket which class should i use? any help, guidelines will be greatly appreciated. Thanks!

It shouldn't matter where the remote git repo is located, so it should work with BitBucket just like it does with GitHub. You would clone the repo from BitBucket to the server where NiFi Registry is running, and then configure providers.xml to use the local cloned repo, and enter credentials to enable pushing to remote.
It should work the same as how you would interact with the git repo from the command line. You add or modify files in the local repo, commit them, then push to remote. In this case, all these steps will be done by registry for you.

Related

How to add private repo which I don't owned on docker hub for auto build

I want to use docker hub to do an auto build on every commits sent to github. It works fine for the git repo owned by my account. What if there is a private git repo and I have the write access, that repo doesn't appear on the docker hub when I search git repos under my account. Is there a way to add the git repo on docker hub for auto-build?
You would need to fork that repo (it would still be private) and set that repo on Docker Hub (warning: you only get one private repo for free, after that you would need to buy a plan)
Then you can put in place:
a GitHub webhook on the original repo
a webhook listener that would receive any push event sent by the webhook.
For each push event, you would pull on your local fork, then push it to your remote fork, monitored by Docker Hub.

GitHub hook trigger for GITScm polling

I configured hooktrigger job with set of pre-defined steps
1.Installed Git and Git hub
2.Jenkins URL http://localhost:8080/jenkins (Running inside Apache)
3.Mentioned Git path in configure section C:\Program Files (x86)\Git\cmd\git.exe
4.Added GitHub URL https://github.com/sanveen/HelloWorldJSP.git with Git hub credentials in job configuration
5.In github added http://localhost:8080/jenkins/hooktrigger/ as jenkins hooks URL
when i commit and pushed the code to repository, nothing happened. Seeing msg in Github as "Last delivery was not successful. Could not connect to server.
Please help to resolve on this

Dockerhub automated build: BitBucket repository with private submodules

I have a private BitBucket repository that stores my Dockerfile. This repository has two other private BitBucket repositories as git submodules. I setup an automated build process on Docker hub and added the public SSH key to my three private repositories on BitBucket. However, when the build runs, it successfully connects to the main private repository on BitBucket but fails when trying to get the submodules. I see the following error in the log file:
fatal: could not read Username for 'https://bitbucket.org': No such device or address
It seems like the build agent is trying to access the submodules via HTTPS, and obviously, fails as there is no web access setup.
Am I missing something or is it a limitation that I'll have to live with for the moment?
I figured it out. My .gitmodules had an HTTPS URL for that particular repository. I edited the .gitmodules file and changed the URL to SSH. Seems like it is building now :-)

Git plugin for Jenkins doesn't work with BitBucket repository

I have a project on bitbucket with git repository.
I want Jenkins job that pulls stuff from that repository. So I installed the Git Plugin.
I configure My Jenkins job to use git repository. I add credentials I use on BitBucket. Then I enter repository URL like this:
https://PawelRoman#bitbucket.org/PawelRoman/myproject.git
I'm getting the following error in red:
Failed to connect to repository : Failed to connect to https://PawelRoman#bitbucket.org/PawelRoman/myproject.git using credentials PawelRoman on BitBucket (status = 401)
401 seems like an authorization issue, but what can possibly be wrong? When I run git clone command manually from the server where I have Jenkins installed, using exactly the same repo URL and exactly the same credentials - it works without any issue. I am 100% sure the credentials are OK and repository URL is fine. How can I track down the cause of the issue?
Found out what the issue was. Repository URL was incorrect. For some reason jenkins git plugin does not allow for Username# in the repository URL.
So instead of https://PawelRoman#bitbucket.org/PawelRoman/myproject.git
You need to use
https://bitbucket.org/PawelRoman/myproject.git
And it will work.
User this url to get the project from the bitbucket
https://<user>:<pass>#bitbucket.org/<user>/<project>.git

jenkins doesn't generate the build automatically using local git repository

In my system i am using local git repository and jenkins server,I clone the bitbucket repository into my local git repository and perform all the operations it does well.
I would like to generate the bulids automatically whenever there is push is going from local git to bitbucket for that i give the git repository url in the source code management and mark the build trigger `when a change is pushed to bitbucket
Later i apply and press save.
Now I did some modifications in local git and pushed it also,it is successfully pushed and data is updated in bitbucket also but in jenkins there is no build
can any one please help to me.
If you do not want to poll, you must configure BitBucket to notify your Jenkins when something happens. These are called "hooks". You can read about them at https://confluence.atlassian.com/display/BITBUCKET/Manage+Bitbucket+hooks and there is a whole section on how to configure a hook for Jenkins.

Resources