AWS Code PipeLine not getting all repository of BitBucket account - bitbucket

I am using AWS CodeBuild and CodePipeline service to implement CI/CD in my project.
AWS CodeBuild using Bitbucket I am getting all repository of my Bitbucket account.
While Creating CodePipeLine and connect with my BitBucket, I can't get all repository of my BitBucket account.
I have admin access to BitBucket.
AWS CodeStar injected successfully in Bitbucket
So is there any extra setting need in the BitBucket account for implement AWS Codepipeline?

CodePipeline uses a Bitbucket App installed on your Bitbucket account to access repositories. Currently Bitbucket only allows Apps to access repositories on the same account that the App was installed on.1 I’ve passed this feedback onto the CodePipeline team who is partnering with Atlassian on this integration.
For now you can try this workaround:
Select the connection
Type the name of the Repo as <account>/<repository-name> in the "Repository name" field
Select the branch
CodePipeline connection should be able to retrieve the repo when you run the pipeline.
References
1: Bitbucket connections only provide access to repositories owned by the Bitbucket account that was used to create the connection.

Currently, Bitbucket only allows Apps to access repositories on the same account.
You can create a webhook from Bitbucket to GitHub and connect the correct Github repo to CodePipeline.
https://poeditor.com/blog/webhooks-solution-automate-sync-poeditor-github-bitbucket-repos/#:~:text=To%20add%20a%20webhook%20to,URL%20in%20the%20empty%20field.

We were able to get acces to the repositories in another workspace by giving, to our bitbucket service account, workspace administration rights.
We added it to a group that has the right to
Permission needed for account
For sure, you need a bitbucket administrator doing that for you.
Having done that, we can create a codestart connexion that access the repository in another workspace.

Related

How to push to a private bitbucket repo without a user email?

I have a private bitbucket repo pipeline and I want to use it to update some files on another bitbucket cloud gitops private repo, and I'm wondering whether there is a way to set credentials on the gitops repo without creating or using a user email, like setting a password or ssh keys in the gitops repo and use that in the pipeline to be able to push.
Any help would be appreciated.

Jenkins freestyle project using Gitlab API Token never clone the repository, no error, build always succeed

I've followed this gitlab tutorial link, to connect my jenkins server to Gitlab.
Everyting went fine, and I've :
created a personnal access token in my GitLab profile
created a GitLab API Token using the my GitLab access token in jenkins system configuration as stated in the tutorial
create a freestyle jenkins job and Choose my GitLab connection from the dropdown
checked the Build when a change is pushed to GitLab checkbox.
checked the Accepted Merge Request Events and Closed Merge Request Events checkboxes
generated a secret token from the above freestyle project
use the freestyle jenkins project secret token to create a webhook in the GitLab project repository integration settings
Till there everything went fine.
Then I added and push code including a jenkinsFile to my GitLab repository, and get to the Jenkins WebUI to view the build status, but the pipeline shown green saying build success, while nothing happened, no code has been retrieved from GitLab (as shown in the attached console output screenshot), thus no jenkinsFile executed nor error message shown.
I tried to run the buils manually from WebUI but same result, no way to trigger my pipeline on git push events from GitLab
I thought may be I should select Git in Source Code Management section (I left it to None as the tutorial doesn't mention it) but if I choose Git as SCM I cannot select my GitLab API Token credentials, seeming like we cannot use GitLab plugin (API Token) and Git plugin for the same build project.
SO how should I proceed to be able build my jenkins project from GitLab with a jenkinsFile, using GitLab API Token?
Does the GitLab tutorial miss some useful steps?
OK, I think I understand the issue now.
There are two sets of credentials: GitLab API token for access to GitLab Webhooks and a separate one for cloning the git repo during builds.
So we can't use the GitLab API token for cloning the repository. For this you have to use either a SSH key or a Username/Password combination. Furthermore this dropdown is part of the git plugin not the gitlab plugin.
So the gitlab plugin can't tell which credentials are available as credentials for this dropdown.

Is there a way to create organization folder in Jenkins for Bitbucket Server(Stash)

I see we can create organization folder in Jenkins for Bitbucket or GitHub by setting up Bitbucket Teams for Bitbucket and GitHub Organization for GitHub. This helps to scan the repositories and get them into Jenkins(to organization folder) and automatically create Multibranch pipeline project
Is there a way to do the same for Bitbucket Server i.e., to create a Organization folder for it and scan for repos, get them to Organization folder and create Multibranch pipeline project automatically
This can be done by installing the plugin BITBUCKET SERVER INTEGRATION.
While creating the job, select Bitbucket Teams project.
Under projects,
The credentials are of Bitbucket Server(Stash)
Owner field is the project key of Project which is created in Bitbucket Server
Give Jenkinsfile in Pipeline Jenkinsfile field.
In Jenkins-> Configure system,
Under Bitbucket Server integration
Add instance details
Personal access token is generated in Bitbucket Server(latest versions)
Under Bitbucket Server
Add server URL details.
After running job,
we will find a multibranch pipeline project being created with the name of project which is in Bitbucket Server.

BitBucket Hook option not visible

The below link talks about bitbucket hooks option which can be configured at repository level.
https://developer.atlassian.com/server/bitbucket/how-tos/hooks-merge-checks-guide/
I do not see this option in my bit bucket account under repository settings. Can anybody let me know where I can find this option.
You're looking at Bitbucket Server documentation but attempting to use Bitbucket Cloud. Bitbucket Cloud does not currently support custom hooks.

Unable to create BitBucket OAuth Consumer

I am trying to install the BitBucket Status Notifier Plugin and as part of its documentation it is mentioning to create OAuth Consumer.
However I am not able to find the option in any setting, even if I am a super admin.
I am using hosted BitBucket v 4.7.1.
Any help?
It works only with BitBucket Cloud only. Look at the wiki page that you mentioned BitBucket Status Notifier Plugin
This plugin aims at the Atlassian-hosted BitBucket Cloud solution, not
BitBucket Server (formerly known as Stash).

Resources