youngmon/atlassian-qna huggingface dataset:
Can JUnit Parser Task select a directory outside of the job directory?
Asked by Peter Kahn:

I want to split my build into a Build and a Test Job. I can set working directory on script tasks so my test job runs in the build job's directory.

When I set JUnit Parser to look for custom results directory I see test results but get a failure message "Could not find test result reports in the /opt/builds/build-dir/PROJ-PLAN-TEST directory."

JUnit Parser Setting: ../PROJ-PLAN-BUILD/\*\*/target/surefire-reports/\*.xml

Has anyone done this kind of split?

Thanks

Peter


Answers:
author: Peter Kahn
body: Bamboo 4.4.2 JUnit Parser bug blocks normal use of shared dependencies. For a viable multi job project one should:

* Create share test-results artifact in test job
* Depend on test-results artifact in subsequent report job
* Add script in report job that copies files to a new location   
  * Moving directory - not enough
  * Touch files in place to set modification dates - not enough
* Point JUnit Parser at the copied files

Running on linux, I added a script task to copy the files

```
if [ -d generated ]; then  rm -rf generatedfimkdir generatedrsync -av target generated
```

I'm told this bug is fixed in 5.0.1 but upgrading bamboo is a multi-week endeavor that needs to be scheduled carefully.


author: Peter Kahn
body: The solution is to share test results artifact from "BUILD" job and depend on it in "TEST" job. This copies the results between the two jobs which would be essential if the jobs execute on different systems.

Related Link: <https://confluence.atlassian.com/display/BAMBOO/Configuring+artifact+sharing+between+jobs>
Symlink feature in Bitbucket Repo
Asked by Chintan Bhavsar:

Hi,

We are migrating source code of Clearcase VOB to Bitbucket Repo. While migrating it, we need to carry over the symlink data to Bitbucket repo. In order to achieve it, we explored many articles but haven't found concrete solution.

Could you please help us to know that if the symlink feature is available in Bitbucket or not?

Please reach out to me if you need any additional information.


Answers:
author: Theodora Boudale
body: Hi [@Chintan Bhavsar](/t5/user/viewprofilepage/user-id/4665511) and welcome to the community!

I'm not familiar with Clearcase VOB so I'm not sure how symlinks are used in Clearcase.

Could you perhaps explain with an example/specific case how you used them and what was their purpose?

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
App Passwords and Yocto
Asked by Satish Jadhav A:

How to use App passwords in Yocto Build recipes?

Please help me with an example


Answers:
author: Pramodh M
body: [@Satish Jadhav A](/t5/user/viewprofilepage/user-id/4464635)

App password is used for authentication with remote Bitbucket repositories !!

Here's a similar question

<https://community.atlassian.com/t5/Bitbucket-questions/Bitbucket-app-passwords-where-do-I-use/qaq-p/1935515>

Thanks

comments: author: Satish Jadhav A
body: No, my question is specific with Yocto build systems. the above link is not related to my query.

<br />

for e.g: "git clone <https://username:password@bitbucket.org/dir/repo.git>", command works, wherein password = "an alphanumeric string created by bitbucket"

if I use the same string in the "SRC_URI" field in the Yocto recipe, I get an error for the password field.

for e.g :"SRC_URI = "git://username:password@bitbucket.org/dir/repo.git;branch=somename;protocol=https;"

Error: "fatal: could not read password for '<https://username@bitbucket.org>': No such device or address"

Please advise how to use the bitbucket app password in the SRC_URI field of the Yocto recipe.


author: Pramodh M
body: Instead of your account password, its

e.g :"SRC_URI = "git://username:app-password@bitbucket.org/workspace/repo.git;branch=somename;protocol=https;"

Clone URL is available in your Bitbucket repo and App paasword can be created in your personal settings page

<https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/>


author: Satish Jadhav A
body: The "password" I was referring to in my reply refers to "app-password", which does not work with Yocto recipe.


author: Simon B?hler
body: [@Satish Jadhav A](/t5/user/viewprofilepage/user-id/4464635)did you find a solution in the meantime, I have the exact same issue


Tags: bitbucket-cloud

cloud

yocto
How can i execute aws sts assume-role --role-arn command from bitbucket pipeline?.
Asked by manish:

i am trying to execute below command from bitbucket pipeline. its throwing error to execute aws configure command.

I am looking to read AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY from assume role .

The below command working file in mine local command prompt.

- CRED =$(AWS STS assume-role --ROLE-ARN ARN:AWS:IAM::xxxx:role/assume-role --role-session-name "RoleSession1" --query 'Credentials.\[AccessKeyId,SecretAccessKey,SessionToken\]' --output text)

- export AWS_ACCESS_KEY_ID=${CRED\[1\]}  
- export AWS_SECRET_ACCESS_KEY=${CRED\[2\]}  
- export AWS_SESSION_TOKEN=${CRED\[3\]}

Below error in pipeline while executing above commands-

How can i execute above commands from bitbucket pipeline.


Answers:
author: Norbert C
body: Hi Manish,

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you! Welcome to the Atlassian Community!

You mentioned that: "Below error in pipeline while executing above commands"

Can you please share with us, what's the error you receive in Pipelines while you execute the command? That'll help us troubleshooting your issue.

We're looking forward to hear from you.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


Tags: bitbucket-cloud

cloud
Bitbucket app passwords - where do I use?
Asked by proteusleadership:

I am updating my account with App Passwords as the Login password will no longer be able to be used for **Git over HTTPS, Bitbucket API, or both (Git over HTTPS and Bitbucket API**

So my question is, will I need to update my password in VS Code (to app password), where I push my code to Bit Bucket via GIT? If so, what is the best way to do it in VS Code?

Thank you.


Answers:
author: Pramodh M
body: Hi [@proteusleadership](/t5/user/viewprofilepage/user-id/4745167)

Welcome to the community ?

Yes Correct going forward you need to authenticate with App password for remote authentication with bitbucket repositories

For VS code the OAuth will take action when you try to authenticate with bitbucket repo

Here's a guide

<https://support.atlassian.com/bitbucket-cloud/docs/clone-a-git-repository>

Thanks,

Pramodh

comments: author: proteusleadership
body: Thanks [@Pramodh M](/t5/user/viewprofilepage/user-id/3691224) too easy.


author: Ollie Branch
body: Can I use app password with git? How? My app password is ~~-redacted-~~, I made it to be able to do everything. Let me know, please! I can not commit to bitbucket

comments: author: Earl McCutcheon
body: Hi [@Ollie Branch](/t5/user/viewprofilepage/user-id/4580970) ,

Just a heads up I removed the app password you posted, as this is a public forum and can be viewed by anyone. But I highly recommend resetting the app password at your earliest convenience in case someone decides to access it without your consent.

Regards,  
Earl


author: Mohd Saquib Khan
body: Hi [@Earl McCutcheon](/t5/user/viewprofilepage/user-id/502460)

If someone had stolen the app password and the email address used for Bitbucket account, is it enough to revoke the app password and make a new one? Because the VScode is still able to access the repo even after revoking the app password. Please let me know what measures should be taken?

Regards,

Mohd Saquib Khan


Tags: bitbucket-cloud

cloud

git

password

vscode
Pipes in private repository with a port number cannot run on (self-hosted) Bitbucket Runners
Asked by Aaron.Luo:

We are testing private pipes with self-hosted Bitbucket Runners. I know we can use *`docker://my-docker-registry/repo:tag `* to refer to a pipe in a private repository in pipelines. But our internal docker repository has a specified port (non 443) configured, so the pipe reference becomes *docker://my-internal-docker-registry: port/repo:tag which introduces an issue while running the pipe*. Here is an example:  

```
step:
  script:
    - pipe: docker://my-internal-docker-registry:port/repo:tag
```

While pipelines runners run the pipe, it runs a \`docker container run\` command as follows:

```
docker container run \
--volume=/opt/atlassian/pipelines/agent/build:/opt/atlassian/pipelines/agent/build \
--volume=/usr/local/bin/docker:/usr/local/bin/docker:ro \
--volume=/opt/atlassian/pipelines/agent/ssh:/opt/atlassian/pipelines/agent/ssh:ro \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes \
--volume=/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/nmy-internal-docker-registry:port/repo \
--workdir=$(pwd) \
--label=org.bitbucket.pipelines.system=true \
--env=BITBUCKET_STEP_TRIGGERER_UUID="$BITBUCKET_STEP_TRIGGERER_UUID" \
--env=BITBUCKET_REPO_FULL_NAME="$BITBUCKET_REPO_FULL_NAME" \
--env=BITBUCKET_GIT_HTTP_ORIGIN="$BITBUCKET_GIT_HTTP_ORIGIN" \
......
--env=DOCKER_HOST="tcp://host.docker.internal:2375" \
--env=BITBUCKET_PIPE_SHARED_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes" \
--env=BITBUCKET_PIPE_STORAGE_DIR="/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo" \
......
--add-host="host.docker.internal:$BITBUCKET_DOCKER_HOST_INTERNAL" \
my-internal-docker-registry:port/repo
```

which causes an error because of colon (: between *my-internal-docker-registry* and *the port number*) in the path of volume mount:

```
docker: Error response from daemon: invalid volume specification: '/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo:/opt/atlassian/pipelines/agent/build/.bitbucket/pipelines/generated/pipeline/pipes/my-internal-docker-registry:port/repo'.
See 'docker run --help'.
```


Answers:
author: Graham Gatus
body: Hi [@Aaron.Luo](/t5/user/viewprofilepage/user-id/4657566)

We've created a bug for this issue - <https://jira.atlassian.com/browse/BCLOUD-21719>

Please watch that ticket for updates.

comments: author: Aaron.Luo
body: Thanks [@Graham Gatus](/t5/user/viewprofilepage/user-id/809989)


Tags: bitbucket-cloud

bitbucket-pipelines

cloud

server
"authentication not supported" - is this related to some others reporting ssh issues Feb 3, 22?
Asked by psantt15:

Hi all,

Not sure when I last pushed or pulled from bitbucket, but I receiving "authentication not supported" when trying to push through https:// to my repo. The "account password" change effective March 1 according to what I've read = shouldn't impact (yet). I'm using Eclipse/egit - my cmd line skills are something to be desired.

I've replaced out some of the specifics with generics, but here is the Eclipse/java error flow:

Caused by: **org.eclipse.jgit.errors.TransportException: <https://user@bitbucket.org/user/foo.git>: authentication not supported**   
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:674)  
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:465)  
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:167)  
... 5 more

I will play around in cmd line, but this def stops me in my tracks at the moment. Is this related to some of the other issues being reported a day or two ago w/ SSH comm doing what it looks - something similar if not the same?

Thank you.


Answers:
author: psantt15
body: FYI - I needed to change the SSL java from Apache to the built-in one; assuming whatever apache was running had on older version of TLS or something.


Tags: bitbucket-cloud

cloud
Git ssh key work on command line works but not with Jenkins
Asked by dave_watson:

Hi All ..

I am trying to change over my jenkins jobs to use ssh keys rather than the https access that I have been using previously to access my repo's.

I got the command line version of access working properly for my repo, however if I try to use the same ssh keys in my jenkins jobs - the fail with the message:

returned status code 128:  
stdout:  
stderr: Permission denied (publickey).  
fatal: Could not read from remote repository.

Please make sure you have the correct access rights  
and the repository exists.

I have recently updated my jenkins instance as well as my system, tried several different varieties of methods to configure my jenkins instance with out success.

I have looked a similar articles at Atlassian and researched on google how to configure ssh with bitbucket and jenkins without any success.

So I am turning to the community to ask for help with this issue as the deadline for migrating from https access -\> ssh at bitbucket is Mar 1 2022

Thanks for any help you can offer

Dave W.


Answers:
author: Jack Nolddor [Sweet Bananas]
body: Hi and Welcome,

Have you ensure you are using and configure the proper keypair in both jenkins and user settings?

Maybe this article may help you, please kindly check:

<https://geekcontainer.wordpress.com/2018/02/12/integrate-your-bitbucket-with-jenkins-using-ssh-keys/>

Regards


Tags: bitbucket-server

jenkins

server

ssh
Waiter DeploymentSuccessful failed: Waiter encountered a terminal failure state
Asked by Babu Selvam:

I am getting this error when deploying code to AWS EC2 instance via S3 bucket. It is successfully stored to S3 bucket but when deploying it is getting failed.

I used the below YAML script:

image: atlassian/default-image:3

pipelines:

default:

- step:

script:

- apt-get update

- apt-get install -y zip

- zip-r application1.zip.

- pipe: atlassian/aws-code-deploy:0.2.6

variables:

AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION

AWS ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID

AWS_SECRET_ACCESS_KEY:

$AWS_SECRET_ACCESS_KEY

APPLICATION_NAME: $APPLICATION_NAME

S3_BUCKET: $S3_BUCKET

COMMAND: 'upload'

ZIP FILE: $ZIP_FILE

VERSION LABEL: 'my-app-1.0.0'

- pipe: atlassian/aws-code-deploy:0.2.6

variables:

AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION AWS ACCESS_KEY_ID: $AWS ACCESS_KEY_ID

AWS SECRET ACCESS_KEY:

$AWS SECRET_ACCESS_KEY

APPLICATION_NAME: $APPLICATION_NAME

DEPLOYMENT_GROUP: $DEPLOYMENT_GROUP

S3_BUCKET: $S3_BUCKET

COMMAND: 'deploy'

WAIT: 'true'

WAIT_INTERVAL: 60

VERSION_LABEL: 'my-app-1.0.0'

IGNORE_APPLICATION_STOP_FAILURES: 'true'

FILE_EXISTS_BEHAVIOR: 'OVERWRITE'


Answers:
author: Norbert C
body: Hi [@Babu Selvam](/t5/user/viewprofilepage/user-id/4744582)

Thank you for contacting Atlassian Community, my name is Norbert and I'm a Bitbucket Cloud Support Engineer, it's nice to meet with you!

Based on my observation you're using an old version of pipes (0.2.6). We've already released the 1.1.1 version. Can I ask you to try to upgrade your pipes to 1.1.1 and let us know if that makes any difference?

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support


author: Nic Brough -Adaptavist-
body: What errors are you getting when "it is getting failed" and exactly how are you trying to deploy it?

comments: author: Babu Selvam
body: I am trying to deploy a code from bitbucket to EC2 instance using AWS code deploy.

While building in bitbucket, it throwing error like "Waiter DeploymentSuccessful failed"


Tags: bitbucket-cloud

cloud
custom merge-check
Asked by Irina Zagarina:

Hi Guys)

We need a merge-check which checks revision of target branch. Here are more details:

If pull request has been created for a branch with one revision and this revision was updated after merging another pull-request - we should get revisions mismatch for first pull-request, since the state of target branch before merging another pull-request and after merging is different.

<br />

In order to bypass this merge check - it will be enough to restart build for pull-request

Maybe you know some plugin?

Thanks in advance :)


Answers:
author: Ulrich Kuhnhardt _IzymesCo_
body: Hi Irina,

I understand that after a pull request's target branch revision changed (it has been rescoped) you would like to block it from merging?

Can you clarify what 'build for pull request' means for your use case?

It's possible to build and test for the _source_ revision of the PR or the the _target_ revision.

You can also automatically sync the current source branch with the latest target branch after it was updated and trigger a build for the updated (rescoped) source branch.

comments: author: Irina Zagarina
body: Hi Ulrich)

Thanks for your reply.

As for the first question - you are absolutely right.

As for the solution, seems I did not get it. Can you give more details?

Also we do not need the automation. Maybe some warning and notification will be fine.

That is why we are looking for some plugin.

Thanks for looking into this.


author: Ulrich Kuhnhardt _IzymesCo_
body: I suggest the following approach to accomodate your use case:

1. Enable repository merge-check and require a minimum of one reviewer approval

2. Add a suitable post-receive hook to your repository from the MP (click the 'Add hook' button in your repository settings \>\> hooks \>\> Add Hook) (#1). The hook should un-approve reviewers on all open pull requests to the protected branch.

3. Enable the hook for your protected branches like 'develop' or 'release'. Now, if a PR is merged to the protected branch all open PRs will be un-approved and because of (1) they can't be merged.

We have developed [Workzone](https://marketplace.atlassian.com/apps/1211303/workzone-pullrequest-workflow?hosting=datacenter&tab=overview) - an all-round tool that helps teams to configure their PR workflow. Here is a screenshot of the available hooks.

![wzhooks.png](https://community.atlassian.com/t5/image/serverpage/image-id/182900i22C07E5C368E0C1B/image-size/large?v=v2&px=999 "wzhooks.png")

It'll do the job, and much more, if you need more control how your pull requests are handled.

Let me know if I can be of any further assistance.

Best, Ulrich


author: Irina Zagarina
body: Hello Ulrich)

Thanks for the detailed reply.

We have installed an app to test. Have a good one!


Tags: bitbucket-server

server
Forgot email account
Asked by Rob Ty:

Hi, I have username as robktek.

I cannot login to my account as i don't remember my email address. could you please help me to login.

Thanks


Answers:
author: Caroline R
body: Hi, [@Rob Ty](/t5/user/viewprofilepage/user-id/4744408),

I saw that you created a ticket with our support related to the same question and they have already answered you, so to avoid any possible misunderstandings or miscommunication that may arise from discussing the same matter on two different platforms, let's focus on the ticket instead.

Once the ticket is resolved, feel free to share the resolution here to help other community members that may have the same issue.

Kind regards,  
Caroline


author: Bastian Stehmann
body: Hi [@Rob Ty](/t5/user/viewprofilepage/user-id/4744408) ,

Welcome to the community.

We can't help you here, as this is a public forum. Please raise an issue with the Atlassian Support here.

<Https://support.atlassian.com/contact>

comments: author: Rob Ty
body: thanks for that. I created another one.


author: OLAMILEKAN ABOLADE
body: Could you at least use the username with the last password you remember, try check through your browser for history.


Tags: bitbucket-cloud

cloud
Cant add access key for repo for odoo apps
Asked by mega_buster:

I try give read access to odoo apps use this tutorial  
<https://apps.odoo.com/apps/repository-keys>

but i get error  
Someone has already added that SSH key to another account.

and now i cant update code for my customers, please help!


Answers:
author: Pramodh M
body: Hi [@mega_buster](/t5/user/viewprofilepage/user-id/1870581)

May I know what is the exact requirement here?

If you are trying to give the read access, you could generate the private and public keys and add private key to your repository

Here's the guide

<https://support.atlassian.com/bitbucket-cloud/docs/add-access-keys>

Let me know if you have any queries

Thanks,  
Pramodh

comments: author: mega_buster
body: I want to grant read access to odoo apps, they provide a public key that is not added from here <https://apps.odoo.com/apps/repository-keys>


author: mega_buster
body: I added another api key from odoo apps. But error still  
![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/181877i03075C31A1B25CF1/image-size/large?v=v2&px=999 "image.png")


author: Theodora Boudale
body: Hi [@mega_buster](/t5/user/viewprofilepage/user-id/1870581),

Could you please confirm if the public key you are trying to add is the following one?

```
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC0MOb1cZed+8rHQ98MintHY6jfjMHegyFF3K5fkyUdB
```

listed here: <https://apps.odoo.com/apps/repository-keys>

I have tried adding this to a repo of mine for testing purposes, and there were no issues.

<br />

I can see in your screenshot that there is an Access key in this repo.

Can you click on the icon that looks like an eye on that page and double-check if it is the SSH key you are trying to add?

If this specific key has already been added to this repo as an Access key, you won't be able to add it again, as it already exists.

Kind regards,  
Theodora


Tags: bitbucket-cloud

odoo