youngmon/atlassian-qna huggingface dataset:
I am not clear of how bitbucket communicates with runners installed on server.
Asked by Divya Naidu:

Can someone elaborately explain how I can use bitbucket runners for my CICD and how safe is the process?

I somewhere found that the runners communicate to bitbucket on https, and I'm not clear of how the SSL certificates are verified and how can I be sure that this communication is via an encrypted channel.  

My use case:  
1. When a commit is done on a particular branch(eg: main), I want bitbucket pipelines to run.  
2 . It should pull the code on the remote server(from main branch) where bitbucket runner is configured and execute a script after the code is pulled.  

I am also not clear if runners would solve my above use case.  

<br />

Thanks in advance!


Answers:
author: Ben
body: Hi Divya,

Pipelines will communicate through our Stargate API over HTTPS to establish an initial bridging connection with your runner (so that it can communicate to your private IP address).  
Once it has established a connection - it uses websocket rather than HTTPS to maintain the connection between client/server - this is secured with SSL. WebSockets are very secure when used over an encrypted SSL connection.

Pipelines will maintain the connection between your local Runner and the Bitbucket Cloud UI via this websocket where commands are sent to be executed by either the container running on a Kubernetes pod (Pipelines) or self-hosted infrastructure (Runners).  
The build status updates are then returned back in the same manner based on the success or failure of those command executions.

You can cause builds to trigger upon branch push by using the branches tag, this will detect when a git push is made to a branch and will trigger a build accordingly - for information on this please see our documentation:

* <https://support.atlassian.com/bitbucket-cloud/docs/pipeline-start-conditions/#Branches>

I'm unsure of what you mean by **"** **pull the code on the remote server(from main branch) where bitbucket runner is configured"** - is this a repository hosted outside of Bitbucket Cloud?

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

bitbucket-runners

cloud
Gitlab CICD pipeline throws bash: yarn: command not found
Asked by nandhu_sreenivasan s:

Below mentioned is my cicd script  
before_script:  
- apt update  
- apt install rsync -y  
- apt install openssh-client -y  
- eval $(ssh-agent -s)  
- echo "$SSH_PRIVATE_KEY" \| tr -d '\\r' \| ssh-add - \> /dev/null  
- mkdir -p \~/.ssh  
- chmod 700 \~/.ssh  
- ssh-keyscan $LINODE_HOST \>\> \~/.ssh/known_hosts  
script:  
- echo $CI_PROJECT_DIR  
- rsync -v --exclude='.git' --exclude='node_modules' --exclude='.gitlab-ci.yml' $CI_PROJECT_DIR/\* $LINODE_USER@$LINODE_HOST:/root/payload-test  
- ssh $LINODE_USER@$LINODE_HOST 'cd /root/payload-test \&\& yarn build \&\& yarn serve'


Answers:
author: Theodora Boudale
body: Hi Nandhu,

Your question was created in Atlassian's Bitbucket community. We can help with issues related to Bitbucket and Bitbucket Pipelines, but you will need to reach out to Gitlab's support team or community for issues related to their CI/CD pipeline.

Please check the link below for support options:

* <https://about.gitlab.com/support/>

Kind regards,  
Theodora


Tags: bitbucket-cloud

cicd

cloud

gitlab
YAML anchors, aliases & overrides
Asked by sureshh:

It's a great feature described at <https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/>.

But is it possible to use YAML anchors, aliases \& overrides across multiple yaml files across different respositories?

Example, I want to define some common stages build pipeline config in common file and want to reuse it across multiple build yaml files which are part of different bitbucket repositories.

Thanks in advance.


Answers:
author: Ben
body: Hi [@sureshh](/t5/user/viewprofilepage/user-id/5501737)

Sure thing! We have this as a feature, you can read more about how to set this up and implement it within your workspace in the article below:

* <https://support.atlassian.com/bitbucket-cloud/docs/share-pipelines-configurations/>

Cheers!

- Ben (Bitbucket Cloud Support)

comments: author: sureshh
body: Thanks [@Ben](/t5/user/viewprofilepage/user-id/4537226) for your response.

The solution you provided is actually targetting sharing bitbucket pipelines configurations, however I was actually looking for YAML anchors way where I should be able to reuse YAML configuration across multiple repositories.

<https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/> describes solution which works only in single file.

Do you know if thats even possible? Please advise. Thanks.

Note: As per my so far research seems like its not even possible to share such common config across multiple yaml files as YAML considers each file separately.


author: Ben
body: Hi [@sureshh](/t5/user/viewprofilepage/user-id/5501737)

You can only have one YML file per branch and the name will need to be **bitbucket-pipelines.yml.**

You can share the YML configuration across multiple repositories, we have further documentation related to this below (**note: This is a Premium feature**) -

* [Share pipeline workflow configurations across your repositories - Bitbucket Blog](https://bitbucket.org/blog/share-ci-config)

Once you've configured shared pipelines, here's what an example of YAML anchors would look like - here we're using an anchor to refer to a step named build and then referring to it as "develop" later on - **export true** will export and then it can be referred to later on in the other repository through calling it:

**Exported Pipeline (Repo name: Export_Pipeline_Test)**

```
export: truedefinitions: steps:  - step: &build     name: Build test     script:      - echo "Hello world!" pipelines:  develop:  - stage:      name: Build and Deploy to Development      deployment: DEV      steps:        - step:            <<: *build
```

**Import Pipeline**

```
pipelines:  branches:   develop:    import: export_pipeline_test:develop:develop
```

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
CocoaPods is installed but broken (error bitbucket-pipelines.yml)
Asked by Alexander Shilenkov:

Warning: CocoaPods is installed but broken. Skipping pod install. You appear to have CocoaPods installed but it is not working. This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it. This can usually be fixed by re-installing CocoaPods. To re-install see <https://guides.cocoapods.org/using/getting-started.html#installation> for instructions. CocoaPods not installed or not in valid state.  

<br />

My bitbucket-pipelines.yml:  

- step: \&ios-build  
name: Build and upload apps to TestFlight  
runs-on:  
- self.hosted  
- macos  
caches:  
- dartpubcache  
script:  
- gem uninstall cocoapods  
- gem install cocoapods  
- pod --allow-root install  
- pod --allow-root repo update  
- /bin/bash scripts/utils.sh -i -p "${Platform:-ios}" release ${Flavour:-all} ${Environment:-all}  

Tell me how to solve the problem?


Answers:
author: Patrik S
body: Hello [@Alexander Shilenkov](/t5/user/viewprofilepage/user-id/5501586) ,

and welcome to the Community!

Based on the YAML configuration you have provided, it appears that you are utilizing MacOS self-hosted runners.

These runners operate within a shell session directly on your Mac, granting them complete access to your Mac environment and all installed components. Essentially, the runner will execute commands in a manner similar to opening a terminal session on your Mac and entering commands manually.

This means that any executable installed on your Mac will already be available to the runner, so you will not need to install it again as part of your pipeline scripts.

That being said, the error message seems to come from some conflict in the pipeline trying to reinstall a different version of CocoaPods, which is already installed on your Mac, causing that conflict.

I suggest that you first install and test CocoaPods on your Mac directly by opening a terminal session and executing the commands manually. Once you get it working, you can then test your build again, but now remove the *install* and *uninstall* commands from the build as they are not required since CocoaPods is already installed in the runner's host.

Hope that helps! Should you have any questions, feel free to ask.

Thank you, [@Alexander Shilenkov](/t5/user/viewprofilepage/user-id/5501586) !

Patrik S

comments: author: Alexander Shilenkov
body: Thanks, I removed the commands - gem uninstall cocoapods  
- gem install cocoapods  
- pod --allow-root install  
- pod --allow-root repo update

and deleted  
runs-on:  
- self.hosted  
- macos  
and it works for now, it's strange that before that asked for installation CocoaPods  

While it works

My bitbucket-pipelines.yml:  

- step: \&ios-build  
name: Build and upload apps to TestFlight  
caches:  
- dartpubcache  
script:  
- /bin/bash scripts/utils.sh -i -p "${Platform:-ios}" release ${Flavour:-all} ${Environment:-all}

<br />

<br />

<br />

<br />


author: Alexander Shilenkov
body: Can I specify the path to the ios directory to run pod install there?


Tags: bitbucket-cloud

cloud
How can i create a Workspace Webhook?
Asked by Keanu Ledger:

I use a workspace acess_token to make requests to create a workspace webhook, but it fail, and i dont get nothing in terminal. How i kown it fail? I make a request to get all webhooks, but the "value" key comes empty.


Answers:
author: Caterina Curti
body: Hi [@Keanu Ledger](/t5/user/viewprofilepage/user-id/5501377) ,  
Welcome to our community here.  

Can you share a bit more about what you are trying to achieve?  

We recently released [Forge for Bitbucket](https://developer.atlassian.com/platform/forge/) and Forge apps can listen to events too. These are the supported events today: <https://developer.atlassian.com/platform/forge/events-reference/bitbucket>.

<br />

If you want to check this option out, I would recommend starting with the following:  
- Our getting started tutorial: <https://developer.atlassian.com/platform/forge/build-a-hello-world-app-in-bitbucket/>  
- Or you could jump straight into the <https://developer.atlassian.com/platform/forge/automate-bitbucket-using-triggers/> which shows an app that responds to a pull request created events and adds a comment in response to such event.  

To answer your exact question, I'm not entirely sure what's happening. I tried a few combinations and I was always either getting an error (e.g. \`Your credentials lack one or more required privilege scopes\` when the scope wasn't set) or the webhook created. I think the Forge option might be better but if you want to investigate this further please share the payload for the POST and we'll check with that.  

Let us know,  
Caterina


Tags: bitbucket-api

bitbucket-cloud

cloud

webhook
There's a payment that was issued from my card but couldn't find it in my billing account, please he
Asked by Haya Al-Awaad:

**\[SCREENSHOT REDACTED\]**


Answers:
author: Ben
body: Hi Haya,

I have removed the screenshot you shared as this is a public forum, and it contained sensitive/personal information.

I cannot see any paid Bitbucket Cloud workspaces against the email address you have used to raise this community post.

Please raise a request with our accounts/billing team to investigate this further as this is not something that would be able to be answered by our community:

* <https://www.atlassian.com/company/contact/purchasing-licensing#/>

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Missing repo
Asked by Borislav Kezhev:

I can't find one of my old repos. I lastly used it in 10.2020. I think its name was "kapitan" or "kapitansko". How can I find it?

Thanks in advance!


Answers:
author: Ben
body: Hi Borislav,

I've taken a look at the workspaces that you have access to and couldn't find the repository that you've mentioned.

There's a chance you're not logging in with the correct email address that's tied to the workspace containing that repository - you can check your remote configurations and email addresses and attempt to log in to the correct one:

*

  ```
  git remote -vvv
  git config --list?
  ```

If you can't find the repository in your remote - you may be able to find the repository locally, you can push it back up to your remote workspace (see Option 2):

* <https://confluence.atlassian.com/bbkb/how-to-duplicate-a-bitbucket-repository-1276870766.html>

There is a chance, however, that this repository was a Mercurial repository which were discontinued and deleted quite some time ago - in which case, we unfortunately cannot recover these:

* [https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket#:\~:text=Here%20are%20the%20key%20dates,be%20in%20read%2Donly%20mode](https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket#:~:text=Here%20are%20the%20key%20dates,be%20in%20read%2Donly%20mode).

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud
Bitbucket Pipelines failure with SSL Certificate Problem
Asked by Peter Boling:

x Build failed in 22.89s  
error during build:  
63
Error: [sentry-debug-id-upload-plugin] Command failed: /opt/atlassian/pipelines/agent/build/node_modules/.pnpm/@sentry+cli-linux-x64@2.31.2/node_modules/@sentry/cli-linux-x64/bin/sentry-cli releases new 1cefc835e6a8472f914a3f2bda9bcbc0  
64
DEBUG 2024-05-19 08:00:24.578579713 +00:00 sentry-cli version: 2.31.2, platform: "linux", architecture: "x86_64"  
65
INFO 2024-05-19 08:00:24.578655948 +00:00 sentry-cli was invoked with the following command line: "/opt/atlassian/pipelines/agent/build/node_modules/.pnpm/@sentry+cli-linux-x64@2.31.2/node_modules/@sentry/cli-linux-x64/bin/sentry-cli" "releases" "new" "1cefc835e6a8472f914a3f2bda9bcbc0"  
66
DEBUG 2024-05-19 08:00:24.579110707 +00:00 request POST <https://sentry.io/api/0/projects/fisecal-vk/fisecal-monolith/releases/>  
67
DEBUG 2024-05-19 08:00:24.579135805 +00:00 pipeline: vite-plugin/2.14.2  
68
DEBUG 2024-05-19 08:00:24.579147845 +00:00 using token authentication  
69
DEBUG 2024-05-19 08:00:24.579171582 +00:00 json body: {"version":"1cefc835e6a8472f914a3f2bda9bcbc0","projects":["fisecal-monolith"],"dateStarted":"2024-05-19T08:00:24.579086786Z"}  
70
DEBUG 2024-05-19 08:00:24.579181540 +00:00 retry number 0, max retries: 0  
71
error: API request failed  
72
caused by: [60] SSL peer certificate or SSH remote key was not OK (SSL certificate problem: unable to get local issuer certificate)

I don't think I can fix this on my own. :(


Answers:
author: Patrik S
body: Hello [@Peter Boling](/t5/user/viewprofilepage/user-id/5374470) ,

thank you for reaching out to the Community!

I would recommend trying to troubleshoot your pipeline build locally following the instructions in the article below:

* [Troubleshoot failed Bitbucket Pipelines locally with Docker](https://confluence.atlassian.com/bbkb/troubleshoot-failed-bitbucket-pipelines-locally-with-docker-1318882094.html)

This will remove pipeline infrastructure from the equation, so we can rule out whether the issue is related to the pipeline itself, your build config, and/or the external server you are connecting to.

If you are able to reproduce the same error locally, you can try debugging via the command line. Once you get the command working, you can update your YML to match.

Thank you, [@Peter Boling](/t5/user/viewprofilepage/user-id/5374470) !

Patrik S


author: Peter Boling
body: From my research it appears that causes of the error can be:

1. Date / Time being incorrect on the server
2. Self-signed certificates can cause this depending on the requirements of the connection
3. COMMON NAME(CN) of your server certificate needs to match with the Server IP  
4. Attempting an IPv6 request when server doesn't support IPv6 yet


Tags: bitbucket-cloud

cloud
pipe trigger-pipeline is faling due to missing REPOSITORY variable
Asked by Sergey Petrushin:

Hi,

I faced with quite strange issue with traggier-pipeline pipe.

The following code is not working when I'm trying to use self-hosted runners:  

```
multi-rc:

 - step:

name: Trigger Site-A RC

clone:

enabled: false

runs-on:

 - 'self.hosted'

 - 'linux'

size: 4x

script:

 - pipe: atlassian/trigger-pipeline:5.7.0

variables:

BITBUCKET_ACCESS_TOKEN: $REPOSITORY_ACCESS_TOKEN

REPOSITORY: 'frontend'

REF_TYPE: 'branch'

CUSTOM_PIPELINE_NAME: 'site-a-rc'

REF_NAME: 'rc'

WAIT: 'false'

 - step:

name: Trigger Site-B RC

clone:

enabled: false

runs-on:

 - 'self.hosted'

 - 'linux'

size: 4x

script:

 - pipe: atlassian/trigger-pipeline:5.7.0

variables:

BITBUCKET_ACCESS_TOKEN: $REPOSITORY_ACCESS_TOKEN

REPOSITORY: 'frontend'

REF_TYPE: 'branch'

CUSTOM_PIPELINE_NAME: 'site-b-rc'

REF_NAME: 'rc'

WAIT: 'false'
```

Error:  

    ? Validation errors:
    REPOSITORY:

    - required field

Any suggestions?

Thanks.


Answers:
author: Sergey Petrushin
body: ok, I found: incorrect indentation for pipe variables.


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

pipes

trigger
How to install crucible on debian ?
Asked by Lutz Kittler:

We want to use crucible in future. Because all our servers are on debian

we also want to install it on a debian system. Because we want to use it for longer time we want tu use debian testing ( stretch ). Problem is that mysql will be changed to mariadb ( not usable for crucible ) and postgresql is version 9.6. Does anyone use this newer postgres version for crucible ?

Supported platforms are only up to version 9.4.


Answers:
author: Lonnie
body: Hello Kittler, While postgres 9.6 is not officially supported. Crucible and FishEye will work just fine on that version. I know the folks at Atlassian support will do their best to help if you run into a problem.

Having said that you might not want to put your mission critical data on there.

I say test it out and see if it works for you.

Crucible 101 install

<https://confluence.atlassian.com/display/CRUCIBLE/_Crucible+101+Install>


Tags: linux
Crucible-Fisheye: Operation timed out while indexing svn repository
Asked by JAB:

Hello,

We have been trying to index a repository which is about 25GB (45,090 files) on disk. However, it gets stuck around 30% in progress

Type: Subversion  
Description:  
Repository state: RUNNING  
Status message: Expanding paths of changeset 7198  
Initial indexing status: Scanning changesets COMPLETED 18152 of 18152  
Indexing changesets 29.7% IN PROGRESS  
Indexing activity details  
Path expanded 7197 of 18152  
Metadata indexed 7194 of 18152  
Content indexed 7194 of 18152  
Changesets done 0 of 18152

Tue May 09 13:18:04 GMT-500 2017 Operation timed out

This has been running for weeks...

I am not sure what to do.

Thanks,

Joseph


Answers:
author: Marek Parfianowicz
body: Did you check FishEye log files? The "Operation timed out" may be related with Subversion server timeouts. See this post: [https://confluence.atlassian.com/fishkb/svn-operations-taking-longer-than-an-hour-time-out-229180362.html](https://confluence.atlassian.com/fishkb/svn-operations-taking-longer-than-an-hour-time-out-229180362.html?)


Tags: index

repository

svn
crucible.py conflicting content when svn:mergeinfo changes
Asked by Scott_Ruskamp:

Using Atlassian FishEye analysis with Crucible code review. (Version:4.4.0 Build:20170412122150 2017-04-12). Note that I added a "Console.error(error_body)" line after the "Failed to anchor" line in crucible.py.

$ svn diff folder --depth empty  
Index: folder  
===================================================================  
--- folder (revision 245606)  
+++ folder (working copy)

Property changes on: folder  
___________________________________________________________________  
Modified: svn:mergeinfo  
Merged /folder:r229420  
$ svn diff folder --depth empty \> temp  
$ crucible.py APREV -r XXX -f temp  
...  
Error: Failed to anchor the patch to repository XXX, please check that the repository is the correct one  
{u'message': u"Unable to anchor patch \[APREV-27-patch-0.txt\] to repository \[XXX\]: Crucible tried to anchor your patch to 'XXX', but there was conflicting content in 'folder' at revision '244550'.", u'code': u'PatchAnchorFailed'}  
$ svn diff -c 244550 folder --depth empty  
Index: folder  
===================================================================  
--- folder (revision 244549)  
+++ folder (revision 244550)

Property changes on: folder  
___________________________________________________________________  
Modified: svn:mergeinfo  
Merged /folder:r240714,242943


Answers:
author: Lonnie
body: Hi, As a test if you run crucible.py from within the repo and provide options. Are you able to connect and enter the requested information? Does that anchor to the Review?

I am not sure but it seems like you had a folder named "folder" then removed it and added it back. Is that correct? Get the full diff and try to anchor it.

Thanks

Lonnie
Announcement Banner in Fisheye Crucivle
Asked by Athanasios Bladis:

Hello together,

how can i set a banner in Fisheye Crucible without a Announcement Banner Plugin and also without a Welcome Message. i found out that on Confluence its very easy and i m searching for a same simple way to configure it.

BR

Sakis

BMW AG


Answers:
author: Piotr Swiecicki
body: I'm afraid there is no announcement banner available out of the box in FishEye/Crucible. You can try using plugin available on marketplace: <https://marketplace.atlassian.com/plugins/com.glintech.fisheye-announcement-banner/server/overview> or writing your own plugin, perhaps?


Tags: fisheye-crucible-administration
Limit not working while fetching data using REST API
Asked by Shruti Anantwar:

While fetching data usin REST calls from fisheye and crucile, the limit parameter is not working. Is there any alternative for it?


Answers:
author: Piotr Swiecicki
body: Hi Shruti,

Please note not every FishEye/Crucible REST API method supports pagination, the ones that do support have it explicitely mentioned in the documentation.

Let me know what URL are you trying to hit so I can clarify if pagination is supported for this endpoint or if there is alternative paginated endpoint that could be used instead.

comments: author: Shruti Anantwar
body: Hi, I tried limiting data while fetching repositories. Here's the query,

http://localhost:8060/rest-service-fe/repositories-v1?limit=1

Inspite of applying limit=1, I'm getting all the list of repositories. I am facing same issue with other queries as well (Eg. users, revisionInfo etc).


author: Piotr Swiecicki
body: note GET request to <https://docs.atlassian.com/fisheye-crucible/latest/wadl/fisheye.html#rest-service-fe:repositories-v1> resource lists all the repositories, while GET request to similar <https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:repositories> resource retrieves a page of repositories. The latter use paginated API.

Similary use [https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:users to](https://docs.atlassian.com/fisheye-crucible/latest/wadl/fecru.html#rest-service-fecru:admin:users?to) retrieve page of users etc.

Hope that helps


author: Shruti Anantwar
body: Hi Piotr,

It worked. Thanks a lot! :)