youngmon/atlassian-qna huggingface dataset:
How do I fix the java service wrapper in Bamboo 3.2 on linux?
Asked by Nicholas Miller:

The wrapper throws an error out of the box: eval: 1: /home/foouser/Bamboo/wrapper/wrapper: not found.


Answers:
author: Przemek Bruski
body: I think you got the 32bit version of wrapper. Can you use bamboo.sh to start Bamboo or do you have specific need for the wrapper?

BTW: 64bit version of wrapper and wrapper library is in Bamboo/webapp/admin/agent/atlassian-bamboo-agent-installer-VERSION.jar under arch/linux/x86_64 directory.You can just swap the files if you need to run Bamboo via wrapper.


author: Przemek Bruski
body: Does your installer match your OS architecture (i.e 64bit installer on 64bit OS)?

Is the file /home/foouser/Bamboo/wrapper/wrapper present?

If so, what does ldd /home/foouser/Bamboo/wrapper/wrapper show?

comments: author: Nicholas Miller
body: I installed on Ubuntu Server 11.04 64bit. The file I downloaded and installed was 'atlassian-bamboo-3.2.2-standalone.tar.gz'. I got it from: <http://www.atlassian.com/software/bamboo/BambooDownloadCenter.jspa>

/home/foouser/Bamboo/wrapper/wrapper is present :

```
-rwxr-xr-x 1 bamboo bamboo 111K 2011-10-05 13:31 wrapper
```

ldd shows: "not a dynamic executable"


author: Nicholas Miller
body: I installed on Ubuntu Server 11.04 64bit. The file I downloaded and installed was 'atlassian-bamboo-3.2.2-standalone.tar.gz'. I got it from: <http://www.atlassian.com/software/bamboo/BambooDownloadCenter.jspa>

/home/foouser/Bamboo/wrapper/wrapper is present :  
[?](how-do-i-fix-the-java-service-wrapper-in-bamboo-3-2-on-linux?page=1)

|---|------------------------------------------------------------|
| 1 | `-rwxr-xr-x 1 bamboo bamboo 111K 2011-10-05 13:31 wrapper` |

ldd shows: "not a dynamic executable"


Tags: linux

wrapper
Bamboo X.X : Selenium RC integration
Asked by David Ferguson:

Hi Folks,

I'm looking to run Selenium RC functional tests as part of a Bamboo continuous integration system. Is there any information on how to do this?

My main concern is communicating results between Selenium and Bamboo. My understanding is Bamboo requires JUnit style xml output. It seems a wrapper is necessary to translate Selenium results into this format. Has anyone made such a wrapper, or is there an alternative solution?

Thanks so much,

David


Answers:
author: Przemek Bruski
body: There are some excellent tips here: <https://answers.atlassian.com/questions/900/selenium-and-bamboo>


Tags: selenium
Bamboo 2.7: Separate ANT install required?
Asked by David Ferguson:

Hi Folks,

I'm in the process of creating a new Ant builder for Bamboo 2.7. Does Bamboo include Ant or is a separate installation required? If it is included, what's the path?

Thanks,

David


Answers:
author: Przemek Bruski
body: Although Bamboo includes Ant classes, you should install a separate Ant.

comments: author: David Ferguson
body: Hi Przemek,

Thanks for the reply. Can you provide any insight into why a separate install is necessary? My System's Admin insists I know before he allows the install.

Thanks!


author: Przemek Bruski
body: Because you should never ever use software B bundled with software A if developer of software A said you should not use it...


author: David Ferguson
body: Cheers! Have a good one.
High availability for bamboo frontend
Asked by Shailesh Tiwari:

Hello,

How do we make bamboo frontend application highly available? Can we run 2 web frontends and point to a single DB in the back?

Thanks


Answers:
author: Przemek Bruski
body: > Can we run 2 web frontends and point to a single DB in the back?

You can't - the frontend is not only a frontend by also the server side of Bamboo. So, you could set up two servers, but only if you set up one of them to cold standby. If you want to do this, remember that you also need to synchronise the FS data between primary and secondary server.

comments: author: Shailesh Tiwari
body: So there will not be an automatic failover in the case of failue of main server. do you have a detailed doucment about how to go about it?

Thanks


author: Shailesh Tiwari
body: Can you also tell me what is FS data ? I am still new to bamboo servers and trying to get my hands around it.

Thanks for your help.


author: Eclipse Trading
body: I found this doucment that is quite interesting: <http://www.nicholasmuldoon.com/2013/07/bamboo-in-a-high-availability-configuration/>


author: Przemek Bruski
body: AFAIK, there's no document about high availability for Bamboo. FS data is filesystem data. Some of the data is kept by Bamboo in its home directory. You need to make sure that this data is in sync with the backup server.
The local agent abilities
Asked by Magi:

Hi,

I'm wondering if I can create a bash script to connect to remote server via ssh without using a remote agent.

Thanks in advance for the reply,

Magdalena


Answers:
author: ReneR
body: Your question is not very clear.


author: Colin Goudie
body: Yes I would imagine so. A local bash script is a local bash script. If it executes commands via ssh, bambbo wouldn't know the difference.
Mercurial repository URL - build variables
Asked by Adam Woods:

Hi,

We're using Bamboo 3.2 and are trying to build a specific Mercurial tag or changeset for our release builds. The Repository URL on the source repository configuration screen supports the #revision syntax, which is great. What I would like to do is parametize this using the bamboo build variables.

Something like the following:

[http://path/to/repository#${bamboo.tagToBuild}](http://path/to/repository#%24%7Bbamboo.tagToBuild%7D)

However I get a malformed url error message when I attempt to do this. To me, this seems the simplest way to achieve builds based on a particular tag, but I'd like to know if we're trying to do this the wrong way.

Can anyone please advise how they have overcome with this particular problem? Or is this something unique to us, and possibly indicating that we should be following a different process?

Cheers,

Adam


Answers:
author: PiotrA
body: Use the tag in the branch field instead.

i.e. :

repositoryUrl = <http://path/to/repository>

branch = ${bamboo.tagToBuild}


author: PiotrA
body: Seems to me like a bug in Bamboo. I've raised <https://jira.atlassian.com/browse/BAM-9908> in the Bamboo bug tracker to investigate this issue further.

regards,

PS

comments: author: Adam Woods
body: Thanks PS.

What's the chances of it being addressed in 3.3? And are you aware of any work arounds that will help us out for now?


author: PiotrA
body: what will happen, if you use following:

repositoryUrl = <http://path/to/repository>

branch = ${bamboo.tagToBuild}

Would it work?

ad chances in 3.3 -\> I don't think it would be adressed in 3.3. Maybe in 3.3.1 I'd say.


author: Adam Woods
body: Doh! Looks like I didn't read the documentation properly. It quite clearly says that you can place a tag in the branch field.

Thanks for your help - specifying a bamboo build variable in the branch field works a treat!

If you move the comment into an answer I can mark it as accepted.


author: PiotrA
body: moved... :)
Forcing child plan to get latest revision from svn
Asked by Shailesh Tiwari:

Hello,

Is there an option to force child plan to get the latest revision from svn? I am checking code in parent plan and want child plan to get the latest from svn.

Thanks


Answers:
author: Shailesh Tiwari
body: Options given below do not work. And I couldn't find any other way to make this work.


author: Ken Wood
body: Based on my experience, having a build plan commit to the repository is almost always a reciipe for trouble, and something that I rarely, if ever, allow anyone to request in the build system I manage. If there is any way to avoid making commits during a build, I would urge you to do so.

comments: author: Shailesh Tiwari
body: I agree with you. This is a custom solution for one project and I am unable to find any other way at this time.


author: Przemek Bruski
body: You need to trick Bamboo into thinking these plans use different repositories - for example, by using IP instead of the host name as repository address in the child plan. Or you could specify the port number explicitely in one of the plans:

plan1: svn.host.com/repo/path

plan2: svn.host.com:80/repo/path

comments: author: Shailesh Tiwari
body: I tried the options but it is not working. It is still checking out the old revision


author: Shailesh Tiwari
body: \<label id="fieldLabelArea_bambooVersion" for="bambooVersion"\>I am using following version:\</label\>  
\<label id="fieldLabelArea_bambooVersion" for="bambooVersion"\>Version \</label\>3.2  
\<label id="fieldLabelArea_bambooBuildNumber" for="bambooBuildNumber"\>Build Number \</label\>2600


author: Przemek Bruski
body: Which Bamboo version is that?


author: Shailesh Tiwari
body: No. I only see following line

Updated source code to revision: \<same revision number as parent\>


author: Przemek Bruski
body: Do you get the line: "Detected that parent plan XXX using the same source. Updating to" in the build log?


author: Przemek Bruski
body: Depending on your use case, maybe adding a script task set to "inline script" that does svn up would do the trick?


author: Przemek Bruski
body: Just to make sure: what do you mean by child and parent plans? You have two jobs in separate plans linked together with plan dependencies?


author: Shailesh Tiwari
body: That is correct. I have 2 seperate plans linked via dependency.


Tags: check-out

child-page
How to use a Jira version number in a Bamboo build
Asked by Simon Inglis:

Howdy,

I'd like to paramatarize my Bamboo builds so that a Jira version number is available in the build to assist with packaging.

For example, In Jira I have a version of '1.1'. I'd like my build.xml use that version number and the bamboo build number the naming of the artefacts. For instance naming my release tar file as 'product-\<jira version\>.\<bamboo build\>.tgz'

Thanks,

Simon.


Answers:
author: Jens Schumacher [Atlassian]
body: When using the JIRA Bamboo plugin and it's release management capabilities, you will have access to the JIRA version as a Bamboo variable.

The following variables are available when the build gets triggered by a JIRA release:

${bamboo.jira.baseUrl}

${bamboo.jira.projectKey}

${bamboo.jira.projectName}

${bamboo.jira.version}

${bamboo.jira.username}

comments: author: Andrew Benz
body: Does the entire build need to be triggered by JIRA to get these variables? I have a build that has four stages, the last of which is a manual stage that I was to trigger from the JIRA release function. I only want to use the JIRA variables in the last stage, but when I triggered the manual step from JIRA, it looks like that variable was not picked up and ${bamboo.jira.version} was left alone while ${bamboo.buildNumber} was replaced correctly.


author: Timothy Marks
body: I am struggling with the exact same behavior... (Bamboo 4 and Jira 5)


author: Ron Chan
body: Jens - we're on Bamboo 5.6 and JIRA 6.3, would this answer still be relevant? or what should be expected now? As I recall, there's still a pending issue with "JIRA release triggering build", being that you cannot select the branch you wish to release...which is essentially a showstopper. Any help would be appreciated!Regards,Ron


author: ReneR
body: You can set a Plan variable ahead of time:

<http://confluence.atlassian.com/display/BAMBOO/Using+Global%2C+Plan+or+Build-specific+Variables>

Or set the value as you run the build in 'paramaterised' mode:

<http://confluence.atlassian.com/display/BAMBOO/Triggering+a+Plan+Build+Manually>
How to safely restart Bamboo on a production server
Asked by emddudley:

How can I safely restart Bamboo on a production server? I do not want to interrupt any ongoing builds.


Answers:
author: Ken Wood
body: What I always do is:

\* login to Bamboo as an admin

\* disable all agents

\* wait for any running builds to complete. Once they are complete, no new builds can start because the agents are disabled.

\* now restart Bamboo, monitoring the log

\* once Bamboo is running and the log indicates it's accessible, login as admin again and enable all the agents.

comments: author: emddudley
body: Thanks Ken, this is exactly the kind of process I was looking for.


author: Shyam Visamsetty
body: how to restart bamboo any command that we can run?


author: Saurav Tapader
body: you should be able to restart using the following command:

```
/etc/init.d/bamboo restart
```

(hoping you are running bamboo as a service)


author: Przemek Bruski
body: You have to wait until the builds are finished or terminate them.

Safe restart of Bamboo will be available with Bamboo 3.3 .

comments: author: Peter Kahn
body: Hi Przemek,

Is safe restart available in 3.4 and does it mean I can restart the bamboo server without terminating builds in progress on remote agents?

Thanks

Peter


author: Przemek Bruski
body: You can pause the server, but you will have to wait until all builds are finished.
How to install a version 1 task plugin in Bamboo 3.2
Asked by emddudley:

I wrote a simple task plugin for Bamboo 3.2 and I'd like to install it on our production server. I tried using the Universal Plugin Manager (as described in [the documentation](http://confluence.atlassian.com/display/BAMBOO/Installing+a+Plugin)) but I get the message:
> The plugin PerforceTasks-1.0-SNAPSHOT.jar is a version 1 plugin. Version 1 plugins cannot be dynamically installed. For more information on installing version 1 plugins see the [UPM documentation](http://confluence.atlassian.com/display/UPM/Adding+a+Plugin).

So I would like to manually install it, but I cannot find any documentation on how to do so. What steps do I need to take to install the plugin?  


Answers:
author: emddudley
body: On Windows:

1. Copy the jar
   * Version 1: %ProgramFiles%\\Bamboo\\webapp\\WEB-INF\\lib
   * Version 2: bamboo-home\\plugins
2. Restart the Bamboo service.
3. Enable the plugin in the Plugin Manager


author: Przemek Bruski
body: Try the plugins/ directory in your Bamboo home.

comments: author: emddudley
body: This is only applicable to Version 2 plugins.


author: Jo-Anne MacLeod
body: The link that you provided tells you were to put the files.

<http://confluence.atlassian.com/x/SYJaCw>

comments: author: emddudley
body: FWIW the UPM documentation does not make any mention of Bamboo, only Jira and Confluence.
AWS ECS deploy task defintion with specific image tag
Asked by ahmed_derbel:

Hello, i have a pipeline to deploy to my ECS Cluster with 2 steps , the first one is building new docker image with a new tag for example myimage:3 and in my task-definition.json the image is myimage:2

Is there any methode to update the task-definition.json dynamically with the new generated tag from the pipe? I mean that the new deployed task-definition.json takes myimage:3 and not the tag :2 , currently i change the image tag to 3 in task-definition.json before pushing the new commit

Many thanks


Answers:
author: Halyna Berezovska
body: [@ahmed_derbel](/t5/user/viewprofilepage/user-id/4416404) update task definition is the method from one component, but updating the image is from another - from ECR. So anyway you will have to update the image in your task definition, unless you use latest tag.

You can commit and get it from commit, or , what is more often - to get previous task definition from AWS, update that json file with jq tool to what you need (and perhaps removing some extra fields that are not going to be passed in update_task_definition method like updated_at, created_at), and pass the task definition to our pipe.

Or I suppose if you have to commit task definition, then you have this file in the repository , that means you can reach it from pipeline in $BITBUCKET_CLONE_DIR.

So another way to go is to have definition sth like this:

```
...
image: my-ecr-image:${IMAGE_TAG}
```

, then define $IMAGE_TAG environment variable and use envsubst tool with your task-definition.json , then pass obtained file to the pipe.

Check out:

<https://stedolan.github.io/jq/manual/> or <https://linuxcommandlibrary.com/man/jq> - jq

<https://linux.die.net/man/1/envsubst> - envsubst

Regards, Galyna

comments: author: Halyna Berezovska
body: To work with AWS simpler, you can use our <https://bitbucket.org/atlassian/aws-ecr-push-image/src/master/> aws-ecr-push-image and <https://bitbucket.org/atlassian/aws-ecs-deploy/src/master/> aws-ecs-deploy pipes.


author: ahmed_derbel
body: Thank you so much


Tags: bitbucket-pipelines

cloud
Invalidate multiple distribution ids in single step
Asked by Ankur Jain:

Hi,

We are using multi site approach with our S3 and Cloudfront. And for multiple customer websites, we have multiple cloud distributions.

Can we create invalidations for all of those distributions in iteration or by providing some iterative list?

Looking forward to receive any suggestions.

Thank you.


Answers:
author: Halyna Berezovska
body: [@Ankur Jain](/t5/user/viewprofilepage/user-id/1403140) neither AWS cli , neither boto does not support passing multiple distribution id.

We did not consider such ability, because you already have an option do it in multiple parallel steps, sequential steps and if you want it all at one step, just execute pipe scripts sequentially at one step. All this you can do with your multiple distributions

script:

- pipe:. ..

- pipe: ...

Regards, Galyna

comments: author: Ankur Jain
body: [@Halyna Berezovska](/t5/user/viewprofilepage/user-id/3865505) Thank you so much for your reply.

Yes I have built to do the invalidations in parallel steps and will continue to use the same.

Thanks again for your help.


Tags: aws

bitbucket-pipelines

cloud
Npm workspace lint in pipeline loops and crashes
Asked by Carl Hodder:

Basically that, it appears you can't run npm --workspace commands in the pipeline:

+ npm run lint  
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build  
> npm run lint --workspaces  
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build  
> npm run lint --workspaces  
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build  
> npm run lint --workspaces  
> frontend-next@0.1.0 lint /opt/atlassian/pipelines/agent/build  
> npm run lint --workspaces  
`Continues until it crashes, and then you get a extremely large number of errors.`  
`The first of which is:`  
npm ERR! code ELIFECYCLE  
npm ERR! syscall spawn sh  
npm ERR! file sh  
npm ERR! path sh  
npm ERR! errno EAGAIN  
npm ERR! frontend-next@0.1.0 lint: `npm run lint --workspaces`  
npm ERR! spawn sh EAGAIN  
npm ERR!  
npm ERR! Failed at the frontend-next@0.1.0 lint script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.  
and then this repeated about 100 times:  
npm ERR! A complete log of this run can be found in:  
npm ERR! /root/.npm/_logs/2021-08-19T23_27_12_631Z-debug.log  
npm ERR! code ELIFECYCLE  
npm ERR! errno 1  
npm ERR! frontend-next@0.1.0 lint: `npm run lint --workspaces`  
npm ERR! Exit status 1  
npm ERR!  
npm ERR! Failed at the frontend-next@0.1.0 lint script.  
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.  
The pipeline is only on step 2:  
1) npm install  
2) npm run lint  
And lint script is 'npm run lint --workspaces', I have three apps. Pipeline uses image:node-12.22.5


Answers:
author: Carl Hodder
body: nvm - the official node 12 images install an old npm - 6.14.14, and npm workspaces are in npm 7.


Tags: bitbucket-cloud

cloud
Bitbucket Api v2.0 diff first diff incomplete part of comment @@
Asked by BillyL:

When doing a diff using the url:

[https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/diff/{newTag}..{oldTag}?path={path}\&context=0\&ignore_whitespace=true](https://api.bitbucket.org/2.0/repositories/{workspace}/{repo}/diff/{newTag}..{oldTag}?path={path}&context=0&ignore_whitespace=true)

The first line of each diff has @@ and includes the first diff as an incomplete . Looks like it might be doing a substring.

Is there anyway to get the full line like the 2nd and 3rd lines below?

@@ -24070,0 +24138,3 @@ INSERT INTO "tax_code" VALUES('IL','','2021-01-01'  
+INSERT INTO "tax_code" VALUES('VT','','2021-01-01','2020-12-28');  
+INSERT INTO "tax_code" VALUES('MN','','2021-01-01','2020-12-29');


Answers:
author: BillyL
body: Apologize for the question. It looks like those are comments to the the current line in the previous commit and not the actually new change. I can omit them from my diff.


Tags: api

bitbucket-cloud

cloud

diff
How do I trigger a bitbucket pipeline using API request?
Asked by Ishan Roy:

I am trying to trigger a bitbucket pipeline using the api endpoint, but I am getting the following response:   
{  
"error": {  
"message": "Bad request",  
"detail": "bitbucket-pipelines.yml not found.",  
"data": {  
"key": "result-service.pipeline.yml-not-found",  
"arguments": {}  
}  
}  
}  

This is the request that I am using. I have verified and this branch has the pipeline and I am able to trigger it manually from pipelines section of the repo.  

curl -X POST -is -u username:password \\  
-H 'Content-Type: application/json' \\  
<https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/pipelines/> \\  
-d '  
{  
"target": {  
"ref_type": "branch",  
"type": "pipeline_ref_target",  
"ref_name": "branchname"  
},  
"variables": \[  
{  
"key": "key1",  
"value": "value1"  
},  
{  
"key": "key2",  
"value": "value2"  
}\]  
}'  

<br />


Answers:
author: Theodora Boudale
body: Hi [@Ishan Roy](/t5/user/viewprofilepage/user-id/4522144) and welcome to the community.

The data you need to send with the request depends on the type of the pipeline you want to trigger.

The documentation below has some examples:

* <https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/pipelines/>

Is the pipeline you want to trigger defined as follows

```
pipelines:
  branches:
    branchname:
```

in the bitbucket-pipelines.yml file of this branch? Or is it perhaps a custom pipeline? In case it's a custom pipeline, you'll need to include some additional fields in the request (you can check the examples in the doc).

We'd need to know in which section of your bitbucket-pipelines.yml file this pipeline is defined in order to figure out how it should get triggered.

Kind regards,  
Theodora

comments: author: Ishan Roy
body: Hi [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086), It was a custom pipeline and I was able to trigger the same after adding the selector in the request body. Thanks for the support.   

{  
"target": {  
"ref_type": "branch",  
"type": "pipeline_ref_target",  
"ref_name": "master",  
"selector": {  
"type": "custom",  
"pattern": "Name"  
}  
}  
}  

Thanks and Regards,  
Ishan Roy


author: Theodora Boudale
body: Thank you for the update [@Ishan Roy](/t5/user/viewprofilepage/user-id/4522144) and you are very welcome, I'm glad to have helped!

Please feel free to reach out if you ever need anything else.

Kind regards,  
Theodora


author: abhishek.singh
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) it's not working because of our repo under VPN ,  


author: abhishek.singh
body: Api request working fine from local when we connected with vpn

But we want make request from bitbucket pipeline then it's not working  
Because requester(bitbucket pipeline )have different ip not vpn ip  
We are using bitbucket host


Tags: bitbucket-pipelines

cloud