youngmon/atlassian-qna huggingface dataset:
Add Requirement task
Asked by Dana Cleveland:

Looking around Atlassians Blog I ran across this post [](http://blogs.atlassian.com/2013/11/fisheye-continuous-delivery-with-bamboo-deployments/)<http://blogs.atlassian.com/2013/11/fisheye-continuous-delivery-with-bamboo-deployments/>

From the 2nd picture I see a few "Add Requirement" tasks. They seem pretty useful, rather than setting the requirements on the tab off the Stage (or additional to) The task seems like it allows you to further set requirements more dynamically and that would show up in the log.

I could find an email address for [Sarah Goff-Dupont](http://blogs.atlassian.com/author/sgoffdupont/) the author of the post, and i couldn't leave a comment.

Basically does anyone know were i can find this plugin to add the "add requirement" task. I think it would be useful, though looking at the bamboo api its probably a pretty easy plugin, though i may be wrong.


Answers:
author: EddieW
body: I suspect that is an internal plugin Atlassian may be using as a workaround to [](https://jira.atlassian.com/browse/BAM-13499)<https://jira.atlassian.com/browse/BAM-13499>which does not allow configuration of Requirements in Bamboo **Deployment Projects**.

You could build your own and expose rquirements using a few provided classes, its not too bad.

[](https://developer.atlassian.com/display/BAMBOODEV/Tasks+Overview#TasksOverview-TaskRequirements)<https://developer.atlassian.com/display/BAMBOODEV/Tasks+Overview#TasksOverview-TaskRequirements>


Tags: bamboo-app

requirement

task
need help to understand what is an artifact (bamboo)
Asked by Jerome Martin:

Hello

All is in the title. I need help because i'm not sure to understand very well what is an artifact. I would like understand the link with the release. I try to explorer the possibilities about deployment with bamboo.

Does someone could explain me that ?

Thanks by advance.

jerome


Answers:
author: Jason Monsorno
body: The artifact is what you want stored in Bamboo as the results of the run. Bamboo using different working directories for each piece of the workflow so they are also used to transistion files from one are to the next. It can be used inside of Bamboo or taken out as your workflow desires.

A quick example would be checking out the source code, building it, and storing just the binaries(build results) as the artifact. Artifacts retain with each build and deployment unless they are deleted(there are some retention options you can set inside of Bamboo), they can stack up quite quick as well and fill up a disk fast if you're not careful.

comments: author: Jerome Martin
body: Thank you Jason for your answer and thank you for the advice, i'll be care with that too.
Dragons - Bamboo Build: #1 failed ?First build for this plan
Asked by Will Wilmot:

Getting this error when I run the build:

\[INFO\] ------------------------------------------------------------------------  
\[ERROR\] BUILD ERROR  
\[INFO\] ------------------------------------------------------------------------  
\[INFO\] Error building POM (may not be this project's POM).  

<br />

Project ID: org.apache.maven.plugins:maven-clean-plugin  

Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in repository: Unable to download the artifact from any repository  

org.apache.maven.plugins:maven-clean-plugin:pom:2.2  

from the specified remote repositories:  
atlassian-plugin-sdk (file://C:\\Users\\SWIM_Demo\\atlassian-plugin-sdk/repository),  
central ([http://repo1.maven.org/maven2),\<br\< a=""\>\>atlassian-public (](http://repo1.maven.org/maven2%29%2C%3Cbr)[https://maven.atlassian.com/repository/public)\<br\< a=""\>\>
for project org.apache.maven.plugins:maven-clean-plugin
<br />
\[INFO\] ------------------------------------------------------------------------
\[INFO\] For more information, run Maven with the -e switch](https://maven.atlassian.com/repository/public%29%3Cbr)


Answers:
author: Will Wilmot
body: Hi All,

I solved this internally after a bit of "philosophising"!

The message initially indicates that the issue is with the connection to web repository with the message: Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in repository

And I spent a lot of time reviewing web connection / proxies, etc....

However! the real problem was that I created the instance on a Windows VM machine running on my mac, and the problem ACTUALLY was that it was downloading from the repository fine but the temporary file locations that it downloads within Windows to was defaulting to //VM-SHARE/.... folder and my user did not have rights to create a folder in this location.....

I changed the settings to change the repository location (watch the commented section!)

I hope this helps any others that have this issue.

Take Care,

Will.
Setting up Bamboo as a service on Windows
Asked by fyndor:

Having issues installing Bamboo as a service. JIRA install just worked, Stash was slightly painful until I figured out I needed to change a port in the config. When I got to Bamboo I figured I would at worst just have to repeat the Stash process but I can't figure it out. I can run Bamboo as a console app just fine, but after installing it as a service it will not start. I can't find the log at the moment, but I found a log entry last night that made mention of not being a valid Win32 application when I tried to start the service.  

Has anyone had problems being able to start Bamboo as a console app but not a service on Windows? How did you solve it?


Answers:
author: fyndor
body: I got it running. I had to alter the service installer batch script to get it to run.

In service.bat i changed line 136 to read:

set "PR_JVM=%JAVA_HOME%\\jre\\bin\\server\\jvm.dll"

I think my JAVA_HOME, aka jdk install, is 64 bit, but my jre install is 32 bit. The odd thing is that the comment for the line i changed mentioned it was using JAVA_HOME when it was instead using the JRE_HOME variable. It seems to me either the comment in there is wrong or the line itself is wrong.


Tags: bamboo-administration
Bamboo windows cmd batch variables
Asked by Petr Ivanov:

Hi!

I have a problem with running a batch file under windows Bamboo agent. Here is the batch:

```
set git_exe="C:\Program Files (x86)\Git\cmd\git.exe"set build_type=%1set git_repo=%2if %build_type% == Release (    for /f "delims=" %%i in ('UpdateVersion.exe -i Properties\AssemblyInfo.cs -w -r Fixed') do set version=%%i    %git_exe% tag %version%    %git_exe% push --tags %git_repo%    UpdateVersion.exe -i Properties\AssemblyInfo.cs -o Properties\AssemblyInfo.cs -v Assembly -r increment    UpdateVersion.exe -i Properties\AssemblyInfo.cs -o Properties\AssemblyInfo.cs -v File -r increment    %git_exe% add -u    for /f "delims=" %%j in ('UpdateVersion.exe -i Properties\AssemblyInfo.cs -w -r Fixed') do set new_version=%%j    %git_exe% commit -m "Next development iteration [v.%new_version%]"    %git_exe% push %git_repo% master)
```

When the batch is run from the windows cmd - evertythings is fine:

```
[master warning: LF will be replaced by CRLF in Properties/AssemblyInfo.cs.The file will have its original line endings in your working directory.b1e6ce7] Next development iteration [v.1.0.0.8]warning: LF will be replaced by CRLF in Properties/AssemblyInfo.cs.The file will have its original line endings in your working directory. 1 file changed, 2 insertions(+), 2 deletions(-)Counting objects: 7, done.Delta compression using up to 4 threads.Compressing objects: 100% (3/3), done.Writing objects: 100% (4/4), 377 bytes | 0 bytes/s, done.Total 4 (delta 2), reused 0 (delta 0)To ssh://git@git.exmaple.com:7999/project/repo.git   a040944..b1e6ce7  master -&gt; master
```

But when the batch is run from Bamboo (either inline or cmd), variables %version% and %new_version% are not substituting:

```
build	18-Mar-2014 18:47:37	[master a040944] Next development iteration [v.]error	18-Mar-2014 18:47:37	warning: LF will be replaced by CRLF in Properties/AssemblyInfo.cs.build	18-Mar-2014 18:47:37	 1 file changed, 2 insertions(+), 2 deletions(-)error	18-Mar-2014 18:47:37	The file will have its original line endings in your working directory.error	18-Mar-2014 18:47:37	warning: LF will be replaced by CRLF in Properties/AssemblyInfo.cs.error	18-Mar-2014 18:47:37	The file will have its original line endings in your working directory.error	18-Mar-2014 18:47:37	To ssh://git@git.exmaple.com:7999/project/repo.giterror	18-Mar-2014 18:47:37	   ecec679..a040944  master -&gt; master
```

Please, advise!


Answers:
author: Petr Ivanov
body: Found the problem and solution. It seems than while executing from Bamboo, any variable that is set in FOR loop stays in loop and is not visible from outside.

So - the solution is to move %git_exe% tag %version% and %git_exe% commit -m "Next development iteration \[v.%new_version%\]" to loop.

Possibly, initiating variables before loop will help, though didn't test that.
Using variables for bamboo source repository credentials
Asked by Ramakrishnan Haribabu:

Is there a way to use a bamboo variable to configure credentials for source repositories in a plan ?

I tried creating a variable for the repo's username and password (which got masked automatically), but using them, I was not able to save the repository configuration, as the variable values were not getting applied at the time of save.

Currently, the credentials are hardcoded inside the source repository configuration, but I want it to be entered while running the plan (as Run -\> Customized)


Answers:
author: mpass
body: +1 for this feature request.
Bamboo Deployment Working Directories
Asked by Ron Chan:

Would anyone know why (or the logic) behind Bamboo's Deployment working directory "numeric" naming convention (e.g. 285048835-285147141)? Is there a way to name it with something more meaningful like Project Name?

Regards,

Ron


Answers:
author: Przemek Bruski
body: It's the database id (or two database ids, to be precise). There's no way to name it differently. We will probably let people tag the deployments somehow (mostly for URLs/REST). This won't necessarily extend to directories.


Tags: bamboo-administration
Tagging Bamboo Deployments
Asked by Ron Chan:

We would like to git "tag" our releases upon deployment, however, this requires that the project repository gets checked out.

I know that occurs during a build but how does that work during deployment where only artifacts are retrieved, not the entire repository.

Regards,

Ron


Answers:
author: Jason Monsorno
body: If you can SSH into your git repo you can run a tag command there; otherwise, git does not support remote tagging


Tags: bamboo-administration
How to setup the bitbucket runner on windows so it starts at reboot or autmatically?
Asked by Andrew Ritting:

the current documentation for bitbucket runner on windows starts the runner with a powershell script.

Can there be more documentation for starting this either as a windows service or a script that will work from the task scheduler triggered at startup?


Answers:
author: J. Cole
body: There are lots of ways to tackle this problem. First 'compile' your PS script into an executable file. You can do this natively in Windows without any third-party tools. A script commonly known as "ps2exe" can help you do this.

<https://adamtheautomator.com/ps1-to-exe/#Converting_PS1_to_EXE_via_the_Command_Line>

Then, once you have an .exe, there are numerous ways available for running an executable as a Windows service, also can be done without any third-party software.

<https://stackoverflow.com/questions/3582108/create-windows-service-from-executable>  

\*DISCLAIMER\*

Keep in mind that when running a Powershell script or any non-native Windows application as a 'Windows service', it may not properly respond to to the commands issued by the service manager services.msc, such as 'stop', 'start', etc.


author: edwin vasquez
body: I'll have to find where the batch file is for Bitbucket, but if you already have it, you can follow this guide for help on setting it up on a scheduled task.  

<https://www.thewindowsclub.com/how-to-schedule-batch-file-run-automatically-windows-7>


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Bitbucket pipelines not getting env variables in React
Asked by Zain Khan:

I'm using Bitbucket pipelines to deploy my react app to the s3 bucket, deployments work fine but unfortunately, my ```process.env`` \` variables are undefined. I already add my all env variables in deployment variables.

bitbucket-pipeline.yml

    image: node:14pipelines:  branches:    master:      - parallel:        - step:            name: Build and Test            caches:              - node            script:              - rm -rf package-lock.json              - npm install              - npm rebuild node-sass              - CI=false npm run build:prod            artifacts:              - build/**        - step:            name: Security Scan            script:              # See more security tools at https://bitbucket.org/product/features/pipelines/integrations?&category=security              - pipe: atlassian/git-secrets-scan:0.5.1      - step:          name: Deploy to Production          deployment: Production          trigger: manual          clone:            enabled: false          script:            # sync your files to S3            - pipe: atlassian/aws-s3-deploy:1.1.0              variables:                AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID                AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY                AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION                S3_BUCKET: $S3_BUCKET                LOCAL_PATH: 'build'


Answers:
author: Mark C
body: Hi [@Zain Khan](/t5/user/viewprofilepage/user-id/4782915)

Welcome to the community.

Based on my understanding, you've added your environment variables in the "production" Deployment variables.  
However, after it was deployed to the S3 bucket, the **process.env** file variables are undefined.

If this is correct, I can see that you've built your application in the first step which is "Build and Test" with no deployment environment.  
Then you only use deployment in the third step which is "Deploy to Production".  
I believe variables are undefined in the file **process.env** because your environment variables are only available in the "Deploy to Production" step and that is where you only used the "**deployment: Production**" configuration.

For this, the best I can suggest is for you to use [repository variables](https://support.atlassian.com/bitbucket-cloud/docs/variables-and-secrets/#Repository-variables) instead so that your environment variables are accessible to all your steps.

Hope it helps and let me know how it goes.

Regards,  
Mark C

comments: author: Leonardo Lima
body: But that doesn't solve the problem.  
we need to access a specific Env variable in the build step.  
how can we build an image pointing to production and staging using only repository variables?


author: Mark C
body: Hi [@Leonardo Lima](/t5/user/viewprofilepage/user-id/5302115)  

I'm just wondering, where does **process.env** is currently defined?  
Is it defined when you run the step "Build and Test" or using Bitbucket Cloud Pipelines environment variables (e.g. deployments or repository variables)?  

Regards,  
Mark C


Tags: bitbucket-cloud

bitbucket-pipelines
Can you create a merge check on a pull request that verifies the target branch has not been updated?
Asked by Rob Benton:

I see there is a merge check available that verifies no further have been made to the source branch since the pull request was created. But is there a way to create a merge check that will prevent a pull request is the target branch is ahead of the source branch? For example if the source branch is feature/1 and the target branch is master. But master has had a commit on it since feature/1 was branched from it.


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

welcome to the community!

If I understand your question correctly you are looking to block pull requests that would result in a non-trivial merge, i.e. both source and target branch had independent commits?

As far as I know there is no such merge-check built into BB Cloud. [Here is a ticket](https://jira.atlassian.com/browse/BCLOUD-19885) for Atlassian to allow custom merge-checks so that developers could implement merge-checks like this.

At first I thought you could [use repository forks](https://support.atlassian.com/bitbucket-cloud/docs/fork-a-repository/#Sync-your-fork) and keep them synch'ed automatically - but that's only available in Bitbucket server/dc. See <https://jira.atlassian.com/browse/BCLOUD-17624> as a feature request.

Best, Ulrich

[Izymes](https://marketplace.atlassian.com/vendors/1210584/izymes-pty-ltd) - Empowering Teams


Tags: bitbucket-cloud

cloud
How do I get all the PRs I've approved or reviewed?
Asked by Daniel Fenn:

How do I get all the PRs I've approved or reviewed given a user and/or duration?

Thanks


Answers:
author: Katar?na Luk?csy
body: I will be closing this BCLOUD since an endpoint with this capability exists, so I thought I'd add the note here too.

Specifically, the *pullrequests* [endpoint](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-get) (the second one provided above) supports [querying](https://developer.atlassian.com/cloud/bitbucket/rest/intro#querying), which supports "reviewers.uuid" as well as "author.uuid".

To get a list of open PRs authored or reviewed by a user with user ID equal to 1234567, the API endpoint would look something like this:

/2.0/repositories/{workspace}/{repo_slug}/pullrequests?

q=state="OPEN" AND (reviewers.uuid="{12345}" OR author.uuid="{12345}")


author: Caroline R
body: Hi, [@Daniel Fenn](/t5/user/viewprofilepage/user-id/1187707), thank you for reaching out to Atlassian Community.

Currently, we don't have a specific endpoint to retrieve all the PRs we have approved or reviewed. However, if you want to check all the Pull Requests you have reviewed in a specific repository, you can follow these steps:

* Access the repository

* Go to **Pull Requests**

* Select the options '**I'm reviewing'** and '**All'**:

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

We do have an endpoint that returns all pull requests authored by the specified user and another one that returns all pull requests on the specified repository as you can see here:

* [List pull requests for a user](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-pullrequests-selected-user-get)

* [List pull requests](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-get)

So you could create a script to verify the pull requests from all the repos that you have access to and build a list of any PRs where you were an approver/reviewer if you need this information.

In any case, I went ahead and created a feature request to add this endpoint as you can see here:

* <https://jira.atlassian.com/browse/BCLOUD-21735>

I would suggest that you add your vote there (by selecting the **Vote for this issue** link) as the number of votes helps the development team and product managers better understand the demand for new features.

You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the **Start watching this issue** link) if you'd like to get notified via email on updates.

Implementation of new features is done as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html) and any updates will be posted in the feature request.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

pull-request
Why does Bitbucket need a service account to work?
Asked by Juan Hernandez:

Why does Bitbucket need a service account to work?


Answers:
author: Nic Brough -Adaptavist-
body: Welcome to the Atlassian Community!

Technically, it does not need a service account, it just needs an account that has access to all the services on the operating system that it needs to be able to use to do the job.

Most of us use service accounts for running Atlassian services because it keeps things secure and simple, but also makes it clear that Bitbucket is a service on that machine. You can glance at a box, see "Bitbucket Service Account" and know that all that account does is run Bitbucket as a service, and restarts it if the machine restarts for some reason.

comments: author: Juan Hernandez
body: Thank you!


Tags: account
Your account now has more than 30 repositories created today. Don't worry! You can still create more
Asked by luk_96:

I was importing my repositories from github to bitbucket and when number of my repositories reached 30 i got message: "Your account now has more than 30 repositories created today. Don't worry! You can still create more"  
My bitbucket workspace url: <https://bitbucket.org/luk_96/>


Answers:
author: Caroline R
body: Hi, [@luk_96](/t5/user/viewprofilepage/user-id/4782407), welcome to the community!

This limit is set to prevent abuse, requiring us to validate if it's an actual person with a real need for that. I went ahead and exempted your workspace, so you should be able to create more than 30 repositories now.

Please let me know how it goes and feel free to share any additional questions or concerns regarding this case.

Kind regards,  
Caroline


author: Fabio Racobaldo _Herzum_
body: Hi [@luk_96](/t5/user/viewprofilepage/user-id/4782407) ,

welcome to the Atlassian community!

Bitbucket cloud has a limit on the number of repositories created via UI in a single day. This behaviour is to prevent spam.

Atlassian team could change this limit if you are performing extra activity as repositories migration. In order to ask this change you could raise a ticket, providing all information about your workspace id, to <https://support.atlassian.com/contact/#/>

Hope this helps,

Fabio


Tags: bitbucket-cloud

cloud
Why are my webhook payloads empty!
Asked by Collin Willis:

Hi All,

I've setup a Bitbucket webhook to send pull request info to OpsGenie. So when a Merge, Decline, or Delete action taken against a pull request it triggers a payload to out cloud based OpsGenie to create an alert. But when I look at the payload that OpsGenie receives, all the fields are 'null' so I can't configure a an action in OpsGenie! Is there a step in the webhook setup I'm getting wrong?

Thank all in advance


Answers:
author: Michael Vidallon
body: Hi Collin,

To confirm, have you already configured Bitbucket integration from the OpsGenie side like this? (Under Settings tab is where the Payload URL and/or API key is defined for use in Bitbucket setup)

![Bitbucket Integration in OpsGenie.png](https://community.atlassian.com/t5/image/serverpage/image-id/185924iE2ADFC8ABBAE9FCB/image-size/large?v=v2&px=999 "Bitbucket Integration in OpsGenie.png")


Tags: bitbucket-server

server