youngmon/atlassian-qna huggingface dataset:
Can Ant build tool be used in php project with Bamboo CI? If so plz add that in the documentation. Currently the doc shows example of using Phing....
Asked by Mahder Neway:

Can Ant build tool be used in php project with Bamboo CI? If so plz add that in the documentation. Currently the doc shows example of using Phing....


Answers:
author: Daniel Wester
body: Take a look at <https://confluence.atlassian.com/display/BAMBOO/Ant> for ant configuration. As far as using ant to build a php project - it all depends on what you're doing. As a general rule if you can do it outside of Bamboo on the command line - you can do it in Bamboo...
Trigger branch Build on master update
Asked by toddpi314:

We have an 'integration' branch that we would like to build when our 'master' (default) branch is committed to.

So far, we are unable to find a way to do this based on event notifications.

We have to use the scheduled build, which isn't smart enough to disable when there are no code changes. This ends up bloating the build archives with functionally identical artifacts.

Is this possible?


Answers:
author: Marcin Gardias
body: It is possible with a trick.

Since only the first repository is overriden by Plan Branches in Bamboo, you can create a copy of your repository with branch set to master and use a trigger that will check both repositories. On Plan Branch, the trigger will then check both "integration" branch and "master" because one copy will be overridden and one will be not.

What's not so nice about it, is that on master branch you'll get duplicates of all the commits, other than that it should work fine.


Tags: cloud
Can I create elastic agent with Bamboo Starter License?
Asked by Kit:

When I create a elastic agent via EC2, I found that I can create instance via Bamboo but the elastic agent still suck in status "Pending". Is there any restriction on starter license to create elastic agent?

Additional Information:

I am using a customised AWS AMI image to create instance.

In addition, I cannot access the instance via "elasticbamboo" key which is generated by bamboo server.


Answers:
author: Daniel Wester
body: Bamboo Starter license is limited to local agents:

<https://www.atlassian.com/licensing/starter#bamboo-1>

"With a Bamboo Starter License, you are restricted to 1 local agent and 10 Jobs."


Tags: bamboo-administration
Is it possible to use variables in Bamboo build capabilities?
Asked by Stefan Fu?enegger:

We are currently in the process of migrating our code base to Java 8. So we need some branches to build with Maven and Java 8 and other with Java 7. Is it possible to achieve this without duplicating the plan?

As far as I understand, the "Build JDK" dropdown of a Maven task configures JAVA_HOME, right? Is it possible to change or override this? I thought about adding a Java capability (JDK label = "Java Custom", Java home = "${some.variable}") and set ${some.variable} on the branch level. Is this possible?

(I've experimented a bit but wasn't able to get it working.)


Answers:
author: rsperafico
body: Hello Stefan,

Thank you for your question.

You will not be able to change the jdk used on the branch level. Instead, it will be required to do the Build JDK change in the Plan configuration.

Please, refer to the following documentation for further information:

* Bamboo - [Maven](https://confluence.atlassian.com/display/BAMBOO/Maven)

* [Defining a new JDK capability](https://confluence.atlassian.com/display/BAMBOO/Defining+a+new+JDK+capability)

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support

comments: author: Stefan Fu?enegger
body: So the answer to "Is it possible to use variables in Bamboo build capabilities?" is simply "no"?


author: rsperafico
body: Hello Stefan,Thank you for your update. Correct, you cannot use variables in Bamboo build capabilities.---Kind regards,Rafael P. SperaficoAtlassian Support


Tags: capability

cloud
How do I specify a variable (specifically a file name) in a Bamboo SSH task?
Asked by Sean Norman:

I'm trying to create a deploy plan which:

1. Uploads a shared artifact to a remote server using an SCP task
2. Executes an SSH task that runs a script on the remote server that takes as its argument the name of the file to install to the app server

I have everything working up until step #2, where I'm stuck trying to find a way to execute the deploy script.

Is there any way that I can refer to the file that was uploaded as part of the SCP task? If not, what good is it to SCP a file if we cannot refer to it in future tasks?

We're using Maven for build \& dependency management and each successful build increments the POM number, so the name of the file to deploy isn't static.


Answers:
author: Gretchen
body: The artifact should be what you are copying in an scp task. Getting the name of the artifact in the ssh task looks like it could be tricky though.

My initial thoughts are to put the name of the artifact in an injection variable. But again identifying the artifact may be a problem.

I know that you can reference the artifact directory using variables and perhaps what you need to do if your ssh command is not a static value (a batch script name for example) is get a list of the files in your artifact store for that build here: http://your.org/bamboo/browse/${bamboo.planKey}-JOB1/latest/artifact (assuming your artifacts are created in the JOB1 stage)

If you were to retrieve that as a rest request you could parse it for the specific artifact you are looking for then put that in an injection variable. (essentially a variable/value pair in a text file on the filesystem).

Yes, it is clunky and a hassle to script but it will work.

All that said we generally have the server we are deploying to run a script to pickup whatever artifact we dump there and deploy from the server side rather than trying to do it from the bamboo host. It's just easier to do it that way for us.

For example if you have a tomcat war file to deploy, bamboo dumps the artifact in a staging location on the application server, then a cron or windows scheduled task checks the server staging location and if it finds a candidate (\*.ear) deploys it.

You could also use a script on the server that was executed by a script on the bamboo host that would do the same thing. The difference is that you would be executing a named script "deploy.sh" or "deploy.cmd/bat/whatever" to actually deploy the artifact using wildcards in the script.

Hope this helps.


Tags: deployment

ssh

variable
Atlassian Multi-App Install: How best to deploy?
Asked by Bryan Aho:

We are about to install Jira, Confluence, Stash, Bamboo, Crucible, and Fisheye locally.

Our team presently consists of about 15 individuals; however, we might deploy JIRA more broadly as a helpdesk solution for our organization.

Would our needs best be served by performing a monolithic install of all components on a single machine, or would we be better off in a more distributed arrangement?

We had been kicking around the idea of putting the database server on one VM, and all of the app servers on one or more additional VMs.


Answers:
author: Bryan Aho
body: We are presently reading about how to slay the dragon, here: <https://confluence.atlassian.com/display/ATLAS/Here+Be+Dragons>


author: rsperafico
body: Hello Bryan,

Thank you for your question.

In my opinion, the best option in here would be "divide to conquer". In case something happens to one of the VMs, you will be able to continue working with the remaining.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired. As well as that, others will be able to identify your question as answered, speeding our process of answering to unanswered questions.

Thank you for your understanding.

---

Kind regards,  
Rafael P. Sperafico  
Atlassian Support

comments: author: Bryan Aho
body: Hi Rafael,

Thanks for your reply.

To clarify, are you recommending that we deploy a separate VM for each product? For example, the JIRA VM would have both the JIRA app and database tiers on the same VM, the Confluence VM would have both the Confluence app and database tiers on that VM, etc?

Can you link me to documentation showing installation on multiple VMs?

I appreciate the guidance.


Tags: bitbucket

confluence

fisheye-crucible

install

jira

server
Must I use a custon elastic image to work with AWS VPC?
Asked by Nic Bernstein:

We need to relate our elastic instances with an existing AWS VPC. Does this require that we create a custom elastic image? If not, where do we choose the VPC subnet with which to associate new instances?


Answers:
author: Pavel Korsukov
body: For installation to VPC you may wish to do not use stock AMIs as it is hard to configure the way you want. Including custom ports, DNS, separating a database or just having a good secure configuration for you AWS EC2 instances and VPC networks.

So, I would recommend to take a look on the professional deployment services like Deploy4Me to get your installation of Atlassian products done by best practices. Just check it out: <https://deploy4me.com/en/install/#Vendors=Atlassian>


author: Przemek Bruski
body: You can use a stock image. Select a VPC on the image configuration page.


Tags: cloud
how to trigger pipeline in same repo?
Asked by Joel Stephen:

I need to trigger the same pipeline in the same repo using the pipe parameter, Is it possible to trigger?


Answers:
author: Mark C
body: Hi [@Joel Stephen](/t5/user/viewprofilepage/user-id/4911432)

Welcome to the community.

You can indeed use the [Pipes script](https://bitbucket.org/atlassian/trigger-pipeline/src/master/) to trigger a Pipelines build in the same repo by specifying a specific branch or tag.  
When you mentioned triggering the same pipeline, are you referring to re-running a previously ran Pipelines build?

Regards,  
Mark C

comments: author: Joel Stephen
body: Thanks [@Mark C](/t5/user/viewprofilepage/user-id/1210823) for your answer , we need to trigger the pipeline from one repository to another repository.


Tags: bitbucket-cloud

cloud
Connective issues while connecting with bitbucket
Asked by mani:

HI Team,

We are seeing continues timeouts while pushing from our jenkins to bitbucket. This is causing lot of issues and blocking our releases. Please let us know the solution to overcome the same.

Error:

Fatal error: Can not push to origin:  
To ssh://git@bitbucket.org/belk_ecom/xxxxxx.git  
45909f0..a098d4d feature-mtl -\> feature-xxxxx  
packet_write_wait: Connection to [104.192.141.1](http://104.192.141.1/) port 22: Broken pipe  
fatal: The remote end hung up unexpectedly  
fatal: The remote end hung up unexpectedly

Regards,

Manikanta A


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@mani](https://community.atlassian.com/t5/user/viewprofilepage/user-id/3532601) ,

it seems to be not related to a bitbucket issue. Please review the connection settings :

* <https://askubuntu.com/questions/127369/how-to-prevent-write-failed-broken-pipe-on-ssh-connection>
* <http://thomas-cokelaer.info/blog/2017/05/packet_write_wait-connection-to-xxx-broken-pipe/>
* <https://communities.vmware.com/t5/VMware-Workstation-Player/SSH-connections-dropped-due-to-QoS-flags/m-p/1408691>

Hope this helps,

Fabio

comments: author: Nithinraj Mohanraj
body: Hi [@Fabio Racobaldo _Herzum_](/t5/user/viewprofilepage/user-id/781528) ,

I have the same issue on my laptop (Ubuntu 18.04) as well as my desktop machine. I had been committing changes to my bitbucket repo regularly from the same machines but they starting throwing this error today, and this is the first time I am facing this issue. Note, I have not altered any of my system settings.

Error:

--------------

Counting objects: 8, done.  
Delta compression using up to 4 threads.  
Compressing objects: 100% (8/8), done.  
Writing objects: 100% (8/8), 364.36 KiB \| 3.09 MiB/s, done.  
Total 8 (delta 5), reused 0 (delta 0)  
packet_write_wait: Connection to 104.192.141.1 port 22: Broken pipe  
fatal: The remote end hung up unexpectedly  
fatal: The remote end hung up unexpectedly

--------------

I tried changing the connection settings as mentioned in your previous reply but it did not solve the problem. The workarounds suggested in those posts are related to setting the SSH client changes, but I dont think this change is required especially that my laptop \& desktop had been working fine with code commits all this while without those SSH config changes. It looks like some kind of server side issue.


Tags: bitbucket-cloud

cloud
Connectivity issues while connecting with bitbucket
Asked by mani:

HI Team,

We are seeing continues timeouts while pushing from our jenkins to bitbucket. This is causing lot of issues and blocking our releases. Please let us know the solution to overcome the same.

Error:

Fatal error: Can not push to origin:  
To ssh://git@bitbucket.org/belk_ecom/xxxxxx.git  
45909f0..a098d4d feature-mtl -\> feature-xxxxx  
packet_write_wait: Connection to [104.192.141.1](http://104.192.141.1/) port 22: Broken pipe  
fatal: The remote end hung up unexpectedly  
fatal: The remote end hung up unexpectedly

Regards,

Manikanta A


Answers:
author: Fabio Racobaldo _Herzum_
body: Hi [@mani](/t5/user/viewprofilepage/user-id/3532601) ,

it seems to be not related to a bitbucket issue. Please review the connection settings :

* <https://askubuntu.com/questions/127369/how-to-prevent-write-failed-broken-pipe-on-ssh-connection>
* <http://thomas-cokelaer.info/blog/2017/05/packet_write_wait-connection-to-xxx-broken-pipe/>
* <https://communities.vmware.com/t5/VMware-Workstation-Player/SSH-connections-dropped-due-to-QoS-flags/m-p/1408691>

Hope this helps,

Fabio

comments: author: knightcrusader
body: No, I think this is a Bitbucket issue, specifically with the server at 104.192.141.1.

Every time I do a git pull via SSH and get that IP address, it fails. I have many different machines pulling from it, in different locations and running different OSes. They all fail with that server, doesn't matter which of my machines it is. No other server in your bank of servers gives me a broken pipe error, and its been going on for weeks.

I only found this post because I googled the IP address.

Can someone over there take a look at this server and see what is going on?


Tags: bitbucket-cloud

cloud
Unable to clone from commandline: You can use git to connect to Bitbucket. Shell access is disabled
Asked by Nisarg Panchal:

I have added ssh key and I get following:

$ ssh -T git@bitbucket.org  
authenticated via ssh key.

You can use git to connect to Bitbucket. Shell access is disabled


Answers:
author: Mark C
body: Hi [@Nisarg Panchal](/t5/user/viewprofilepage/user-id/61814)

Thank you for reaching out to the community.

When you tried cloning via SSH, would it be possible for you to provide the specific error message you're getting when while cloning?

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Issue with ssh keys
Asked by VincentRisi:

Unauthorized  
fatal: Could not read from remote repository.

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

I get this when I try a git push.

git status and git pull seem to work.

I would also like to be able to use my private key from other machines.


Answers:
author: Mark C
body: Hi [@VincentRisi](/t5/user/viewprofilepage/user-id/4910677),

Welcome to the community.

For us to further check, would you be able to check the following?

1. Could you possibly check if your remote URL is using an SSH protocol connection using the command **git remote -v**?
2. Would you be able to check if your SSH key identity is authenticated to Bitbucket.org as well by running the command **ssh -T git@bitbucket.org**?

You can also refer to this documentation for more information on troubleshooting SSH issues: [Troubleshoot SSH issues](https://support.atlassian.com/bitbucket-cloud/docs/troubleshoot-ssh-issues/)

Let me know how it goes.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
I'm not receiving bitbucket invitation emails
Asked by cambiado:

Hi

I just started working for new employer, but I am not able to access their bitbucket workspaces. I am not receiving any invitation emails that are supposed to have been sent. I don't understand why it doesn't work.

the admin send me invitation but i dont receiving nothing

I have checked my spam folder, but it is empty.

my email is \<email_removed\>


Answers:
author: Theodora Boudale
body: Hi [@cambiado](/t5/user/viewprofilepage/user-id/3017419),

Just a heads up, I removed the email address from your post to protect your privacy.

<br />

Your email was in one of our suppression lists with the message

```
550: 550 5.4.1 Recipient address rejected: Access denied.
```

This happens when we try to send an email to a certain email address, but we receive a hard bounce response from the recipient's mail server, indicating that the email address does not exist. In this case, the email is placed in a suppression list, as we no longer try to resend to non-existing emails.

I went ahead and removed your email from our suppression list.

**Please note the following though:**

This email address is an **Email alias** to your existing Bitbucket account and not the primary one.  
If you accept an invitation to this email, you will get prompted to create a new Bitbucket account (and if you do so, the email alias will be removed from your existing account).

If this is ok with you, please ask one of your admins to send a new invitation. A new invitation needs to be sent, as the previous ones were dropped.

If you don't want to create a new Bitbucket account, then the invitation needs to be sent to your account's primary email, instead of the email alias.

Please feel free to let me know if you have any questions.

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud

email
Can we add a pipeline step that will execute even on previous steps failed (not after script)
Asked by Chandramouli Naraharisetti:

I've configured runner in EC2 and I've below steps for test automation executions

Step1 - Start machine (runs on - Bitbucket image)

Step2- Run automation scripts (run on - self hosted runner)

Step3- Stop machine(run on - Bitbucket image)

If step2 failed due to some failed tests , Step2 will be skipped. But i want to close the EC2 instance in step3 .


Answers:
author: Mark C
body: Hi [@Chandramouli Naraharisetti](/t5/user/viewprofilepage/user-id/1680062)

Thank you for reaching out to the community.

Unfortunately, while using the [Bitbucket Pipelines multi-steps](https://bitbucket.org/blog/multiple-steps-in-bitbucket-pipelines), if you have 3 steps and the 1st or 2nd step is failed, it won't proceed to the 2nd or 3rd step.

For this, the best I can suggest is to catch the scenario you've described using [after-script](https://bitbucket.org/blog/after-scripts-now-available-for-bitbucket-pipelines).

For example, in your 2nd step, you can set up **after-script** that when step 2 is failed, go ahead and close the EC2 instance.

* Step 1:
* Step 2:
  * after-script
    * If: Failed
      * Do close EC2 instance
    * Else: Success
      * Do something else/nothing
* Step 3: Do close EC2 instance

Essentially, your **after-script** scripts for the 2nd and 3rd steps are slightly the same. (This is because, in the 2nd step's after-script, you'll need to do an if/else)

Hope it helps and let me know if you have further questions.

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Bitbucket login error: "We couldn?t log you in"
Asked by David Simonyan:

Can login into jira or confluence but when trying to login into bitbucket "We couldn't log you in" message appears.


Answers:
author: Theodora Boudale
body: Hi David and welcome to the community.

Your Bitbucket Cloud account was inactive, so I went ahead and reactivated it.

Could you please try to log in to Bitbucket now? Feel free to let me know how it goes.

Kind regards,  
Theodora

comments: author: David Simonyan
body: I can login now, thanks!


author: Theodora Boudale
body: You are very welcome David, please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
Pipeline ignoring .npmrc
Asked by Jorge V?zquez:

Hi!

I'm having a problem that is getting me crazy. I have a node project that use **pnpm** . Inside, near the *package.json* and at the root level there's a **.npmrc** file with a private registry defined. Well... running "pnpm install" the **.npmrc** file is ignored. I have to include a config set into the pipeline script to make everything work. Why the .npmrc file is ignored? Any clue on this?

This is the pipeline:  

```
image: node:16.15

clone:
  depth: full

definitions:
  caches:
    pnpm: $BITBUCKET_CLONE_DIR/.pnpm-store

pipelines:
  pull-requests:
    '**':
      - step:
        name: Build, test and SonarClound Analysis
        caches:
          - pnpm
        
        script:
          - curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7
          - pnpm install
          - pnpm run build:main
          - pnpm run test:main
```


Answers:
author: Patrik S
body: Hello [@Jorge V?zquez](/t5/user/viewprofilepage/user-id/4909746) ,

Welcome to Atlassian Community!

From the behaviour you reported, it seems more to be an issue with the framework you are currently using (npm) and it's own configuration, rather than with Pipelines itself, as we are just providing the container environment for your build scripts commands to be executed. That said, if you clone the repository and run the build in your local machine for the same commit, you will likely reproduce the same behavior.

With that in mind, I would have the following suggestions:

* Add the below command before executing pnpm install in order to list the files in the build directory and check if the .npmrc is indeed there :

  ```
  ls -la
  ```

* Checking if the .npmrc is using the correct syntax to define a custom registry, as per pnpm official documentation :

  ```
  https://pnpm.io/npmrc#registry
  ```

* Check if the packages you are downloading have a scope configured, because as per [nodejs's registry documentation](https://docs.npmjs.com/cli/v8/using-npm/registry) :The registry URL used is determined by the scope of the package (see [`scope`](https://docs.npmjs.com/cli/v8/using-npm/scope)). If no scope is specified, the default registry is used, which is supplied by the `registry` config parameter

Hope that helps! Let me know if you have any question.

Thank you, [@Jorge V?zquez](/t5/user/viewprofilepage/user-id/4909746) !

Kind regards,

Patrik S


Tags: bitbucket-cloud

cloud

node

npm
How to push/pull from git after 1 march?
Asked by fredand44:

Hello,

I feel really stupid, but I can not push/pull from my repos any more. Since the user/password was removed.

I use bash from my linux for git pull/push. I also use Eclipse from same linux.

I have created one app-password (to start with), and called it linux_bash.

I have written down the password.

But how do I connect the app-password with the application for eg bash.

Btw I have several repos on bitbucket, hopefully I hope I just need one app-password.

Best regards

Fredrik


Answers:
author: fredand44
body: Okay, it seems like I just needed to type the app-password like my previous password.

So then I just ask you guys, am I supposed to use the app-password when I use git pull/push? To me it sounded that a app-password is connected to a certain app like bash or linux, but I guess I am wrong, A app-password seems to be like any other password, right?

How ever the app-password is really hard to remember but of course stronger then. But it makes everything a bit more complicated.

If I am not wrong it is possible to configure git to use a preset password. So I guess it is possible to set it to the app-password, but I prefer to need to type it each time. So I guess I need to start to just remembering this string of chars.

Please comment if you got a better suggestion for the use case git pull/push from bash.

Best regards

Fredrik


Tags: git