youngmon/atlassian-qna huggingface dataset:
Task not pulling Docker image on each build
Asked by wsams:

Hi, I have a task that's using a Docker container to perform a deployment.

Under the "Docker" tab of the job I've selected "Docker container"

I've provided an image, and for this example let's say the tag is "stable". The tag doesn't change for this job.

In the Task I have a Script step. The "Interpreter" is "Shell". The "Script location" is "File". The "Script file" is "/deploy.sh". And I'm passing some values in "Argument".

The problem I'm facing is when I build a new image and push to our registry, this job doesn't pull the latest image.

I can make it pull if I create a new tag and set that in the "Docker" tab, but ideally the tag would remain the same. We want clients to use our "stable" tag for their builds and we continually build and push to that image.

Is there a way to ensure the Docker image is pulled before every run? Do I need to add another "Docker pull" task? I think that would work, but was hoping not to have to add another task.

Thanks


Answers:
author: shanishalgi
body: We have the same issue.

This is what works for me: I created another plan with a shell script that pulls the docker image I need. I schedule this plan to run daily. The latest docker is then updated in the cache.

comments: author: wsams
body: Will that pull the image on all of the bamboo agents, or just the one where the shell script was executed?


author: shanishalgi
body: I'm not sure what you mean. You can try and check to see what happens.

See this reference for pulling docker images:  
<https://docs.docker.com/engine/reference/commandline/image_pull/>


author: wsams
body: Our Bamboo instance has multiple agents (separate machines that do the work for a plan). I'm pretty sure we've ruled out that option (separate job/plan to pull the image) because the shell script will be run on one of the agents. On that agent the Docker image would be pulled correctly. But not on all agents. So when our job that uses the Docker image runs, there's no guarantee it will run on the agent with the updated image.

Our administrators could set up a cron job and have that image pulled on every agent, but we'd prefer a checkbox on the job to indicate the agent should pull the image every time the job runs.

We've also pondered having a separate stage to pull the image, but stages within a plan aren't guaranteed to run on the same agent.

For now we've decided to tag each image release. We created a global Bamboo variable with the tag name and update it when we have a release. Each of the jobs that use this image use that variable to set the tag. That's been working and ensures the image is pulled every time the tag changes. It just requires one small manual step per release.


author: shanishalgi
body: It's a shame that Bamboo doesn't support this simple feature.  
Maybe in the future


Tags: docker
exclude folder and its files from build trigger
Asked by caner_saritac:

I would like to exclude a folder entirely from the build trigger.

folder structure

rootfolder

mx.folder.a

mx.folder.b

I would like to exclude mx.folder.b and it's sub folders/files from the build trigger.

How do I do it?


Answers:
author: Jeyanthan I
body: Hi [@caner_saritac](/t5/user/viewprofilepage/user-id/1821075) ,

As of now, there is no such option to exclude a folder from triggering a build.

This is because a new notification is sent from bitbucket server to Bamboo whenever new change is performed in the repository. We should be able to see something like this in atlassian-bamboo.log:

```
POST <BAMBOO_URL>/rest/remote-event-consumer/latest/events/stash-branch-changed-remote-event
```

One way we can do is by using **Exclude changesets** option (that you can find under the respective linked repository definition). You will have to introduce some special message in the respective commit message to differentiate a branch. This way, the commit messages with the [regular expression](http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html) you have added in this section will be excluded.

Hope that helps.

Cheers,  
Jey
DockerException - Error running Docker run command
Asked by Damian:

Hi,

I'm new to Docker and would like to run certain "Jobs" in Docker with "Docker runner". When I want to start a build, I get a docker error.

```
com.atlassian.bamboo.docker.DockerException: Error running Docker run command	at com.atlassian.bamboo.docker.DockerContainerServiceImpl.run(DockerContainerServiceImpl.java:130)	at com.atlassian.bamboo.v2.build.agent.docker.DockerContainerControllerImpl.startContainerIfRequired(DockerContainerControllerImpl.java:79)	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:174)	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:131)	at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:185)	at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:125)	at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:127)	at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)	at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)	at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)	at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)	at java.lang.Thread.run(Thread.java:748)Caused by: com.atlassian.utils.process.ProcessException: Error executing /usr/bin/docker run --volume /home/bamboo/bmhome/xml-data/build-dir/ACI-MAIN-JOB1:/home/bamboo/bmhome/xml-data/build-dir/ACI-MAIN-JOB1 --volume /home/bamboo/bmhome/temp:/home/bamboo/bmhome/temp --detach --name 63e1be61-6813-4d46-8d88-bafc8b40c2902195458 --net=host mcr.microsoft.com/dotnet/core/sdk:latest tail -f /dev/null	at com.atlassian.bamboo.docker.DockerContainerServiceImpl.execute(DockerContainerServiceImpl.java:302)	at com.atlassian.bamboo.docker.DockerContainerServiceImpl.execute(DockerContainerServiceImpl.java:273)	at com.atlassian.bamboo.docker.DockerContainerServiceImpl.run(DockerContainerServiceImpl.java:107)
```

Does anyone have any idea how I can fix this? Or at least get more information about the error?

Thank you in advance,

Damian


Answers:
author: Damian
body: Hi there,

Does anyone have an idea?


Tags: linux
How could I publish my own plugin for Bamboo to Atlassian Marketplace
Asked by Johnason_Yan:

How could I publish my own plugin for Bamboo to Atlassian Marketplace as following:

[https://marketplace.atlassian.com/search?product=bamboo\&query=plugin](https://marketplace.atlassian.com/search?product=bamboo&query=plugin)


Answers:
author: Kurt Klinner
body: [@Johnason_Yan](/t5/user/viewprofilepage/user-id/3792248)

Hi Johnason,

welcome to the Atlassian community

the steps required to create a marketplace listing are described at <https://developer.atlassian.com/platform/marketplace/creating-a-marketplace-listing/>

Hope that helps

Cheers

Kurt
Bamboo v.7 - Unsupported Java Version 13.02
Asked by Nico_Richter:

Hello,

After installing "Bamboo version 7.0.0-rc1 build 70003" on my own server, I got the error message that the installed Java version is not supported.

Type: Bootstrap  
Desc: Could not load bootstrap from environment  
Exception: java.lang.IllegalStateException: Unsupported Java version 13.0.2 detected

Java 11 was previously installed and I got the same error message. I have installed the current JDK (apt-get install oracle-java13-installer) and have already set the $JAVA_HOME variable.

Is an old or specific Java version needed to run Bamboo? If so, which one?

I'm using Ubuntu 18.04 as OS.

Thanks a lot!


Answers:
author: Mikael Sandberg
body: According to the [supported platforms](https://confluence.atlassian.com/bamboo/supported-platforms-289276764.html) for version 6.10 only Java 1.8 is supported, and there is nothing in the release notes for 7.0.0 rc1 that references a newer version of Java, so assume that it also applies for rc1.


Tags: java

linux
Bamboo jobs fail to start with BAMBOO-SSH-PROXY:[User session has timed out idling after 120000 ms.]
Asked by Tarun:

Hi All , we have several Github repos linked to bamboo and we have a couple of jobs that run in parallel. Recently we are seeing issues where the builds fail to start with the error :

```
com.atlassian.bamboo.plugins.git.GitCommandException: command [/bin/git ls-remote ssh://somerepo.git] failed with code 128. Working directory was [/bms/webapps/bamboo/current/temp]., stderr:Warning: Permanently added '[127.0.0.1]:45737' (RSA) to the list of known hosts.BAMBOO-SSH-PROXY: [User session has timed out idling after 120000 ms.]fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
```

It's not really a permission error because the same job on re-triggering works. I just want to understand where is the BAMBOO-SSH-PROXY configured and how to make sure that a lot of builds do not fail with the same error in future.


Answers:
author: Tarun
body: The issue is with GitHub rate limits. Even though the credentials and proxy work, GitHub was rate limiting my user so that I can't make more than certain number of requests per minute and hence was hitting this issue. It would have been a bit better if the error was more specific rather than the generic

```
fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
```

removed the rate limiting on GitHub server to fix this issue.


author: Jana Rebmann
body: We have exactly the same issue when trying to push a tag to the repository. We use Bamboo version 7.1.1 and the build task "Repository Tag". Any ideas how to solve this?
Run Automated Tests on Bamboo
Asked by Divya Bhandary:

Hi,

I have set up Test Automation Framework on Protractor using Cucumber on Visual Studio Code.

Dev team uses Visual Studio -\> Bitbucket as version control system -\> Bamboo as the build server.

I have uploaded the Automation test code to BitBucket (version control system). Now I want to trigger the Automated test suite. I am under the impression that I need to do this from Bamboo. I am not sure if Bitbucket itself can be used to trigger the test automation suite.

Could you please direct me on how this needs to be set up and also could you please share any documentations that would help.

Command that I run in local to trigger the automation suite: npm run test

I have gone through various questions already asked in this community for this question, but could not find the answer.


Answers:
author: Mehmet A _Bloompeak_
body: Hi [@Divya Bhandary](/t5/user/viewprofilepage/user-id/3764486) ,

There are different ways of triggering bamboo plan.

* Scheduled(E.g. daily)
* After a commit to bitBucket
* After some other bamboo plan finishes successfully

For instance you might want to execute the test

* on production web site scheduled(E.g. every night)
* on test environment after releasing the code to test environment.

See the [documentation](https://confluence.atlassian.com/bamboo/triggering-builds-289276897.html) for details. Hope it helps.

comments: author: Divya Bhandary
body: Thank you [@Mehmet A _Bloompeak_](/t5/user/viewprofilepage/user-id/3740047) for the useful information.


Tags: automation

test
How to identify the default branch for a given build key?
Asked by Gregory Paciga:

I'm working on a CI system that uses the current git branch to look up a build key and start a build in Bamboo.

So far, I'm using the /plan/{projectKey}-{buildKey}/branch endpoint to get all the branches and their keys to look up the key for the branch I'm trying to build. The problem is that the default branch doesn't appear in this list.

For example, if I have project key PK and build key BK, I call /plan/PK-BK/branch and get something like this back (leaving out a bunch of keys):

```
{
  "branches": {
    "branch": [{
      "shortName": "my-feature-branch",
      "key": "PK-BK123"
    }, {
      "shortName": "second-feature-branch",
      "key": "PK-BK234"
    }]
  }
}?
```

If my CI server is trying to build my-feature-branch or second-feature-branch, this works fine.

But there's nothing I can find that maps the default branch name - the one I see if I just navigate to /browse/PK-BK in the UI - to the PK-BK build key. Nor have I found anything that goes the other way: knowing that PK-BK is the default, look up what branch name that is. I can't hard code the branch name ("if the current branch is develop, use the root build key") because I want this to work in multiple repos that might have different default branches.

Is there something in the API that can give me this info, or is there a better strategy entirely for mapping from git branch to build key?


Answers:
author: Alex Lynch
body: Help from Atlasian? Is there a way to query the build status of the default branch via the REST API?


author: Dan Riesman
body: 4.5 years after: still a valid question to Atlasian. Google led me to this page.

The APIs like

[http://myhost.com:8085/bamboo/rest/api/latest/plan/{projectKey}-{buildKey}/branch](https://docs.atlassian.com/atlassian-bamboo/REST/5.5.0/#d2e625)

or [http://myhost.com:8085/bamboo/rest/api/latest/plan/{projectKey}/{buildKey}](https://docs.atlassian.com/atlassian-bamboo/REST/5.5.0/#d2e618)

do not return which branch is the default one.

That is a problem, because if you use the following API to get the build results

[http://myhost.com:8085/bamboo/rest/api/latest/result/{projectKey}-{buildKey}/branch/{branchName}](https://docs.atlassian.com/atlassian-bamboo/REST/5.5.0/#d2e339)

and the branch you search IS the default one (assume it is named "default"), you get an error:

```
{"message":"Branch default not found.","status-code":404}
```

Basically, the API works for non-default branches only. Which would not be a problem, if we were able to find out the name of the default branch, and if confirmed to match, use the following API instead:

[http://myhost.com:8085/bamboo/rest/api/latest/result/{projectKey}-{buildKey}](https://docs.atlassian.com/atlassian-bamboo/REST/5.5.0/#d2e284)

But for that I need to be able to get the default branch name somehow.


Tags: rest-api
How to manage deployment job with the current build commit
Asked by ozbillwang:

So we have two stages: Build (CI) and deployment (CD)

Everytime after I run a build I got a number, for example, 123

When I start a new deployment, I set three environments:

```

dev

staging

production
```

the only difference betwen these environments are one environment variable , for example, I set below variables in the deployment job.

```
environment = dev
```

Now I found it is hard to get this simple job done. Because there is no source code checkout to check the commit in that build.

For example, when I run the deployment on build 123, I should see the source code only in that build. tomorrow, I have a new commit and run the build, and generate build 124

If I start the deployment again with same build number 123, it in fact deploys the latest commit (that's in build 124).

Bamboo ask me to do via Artifact, but I don't think that's the right way to do CICD.

So how can I do? any better way?


Answers:
author: Jimmy Seddon
body: Hi [@ozbillwang](/t5/user/viewprofilepage/user-id/1081601),

Can you describe a bit more about the tasks you are using in your deployment stage?

How are you accessing the code that was built within your build stage. Artifacts are generally the way that Bamboo moves built items that you which to save between jobs/stages/etc. So I feel like they gave you the correct advice, but I'd like to know more about what you are doing in your environment to understand why you do think that is the correct way to do things?

Thanks!

-Jimmy
can user role as "CUSTOMER" access the form link in project management ?
Asked by CISB_ICT:

please email to me as soon as possible


Answers:
author: Dave Rosenlund _Trundl_
body: Welcome to the community, [@CISB_ICT](/t5/user/viewprofilepage/user-id/5525903) ?

The Atlassian Community is a peer network comprised (mostly) of Atlassian customer volunteers. We do not work for Atlassian and do not have access to your contact information, so we cannot email you.

Beyond that, currently, your question is rather vague. Can you clarify what you mean by "in project management?"

The more details you provide, the more likely it is someone here may be able to help you.

\~\~\~\~\~\~\~\~\~\~\~

That said, if you truly need immediate assistance, you should [open a JSM support ticket with Atlassian](https://support.atlassian.com/jira-service-management-cloud/).

Good luck,

-dave


Tags: cloud

jira-service-management

jira-service-management-cloud
Best practice to copy ASSETS from production to SANDBOX
Asked by Andy VAN BELLE:

Is there an easy option/method to copy ASSETS from PRODUCTION to SANBOX environment?


Answers:
author: Pallavi Swamy
body: Is a pity that the prod to sandbox sync features do not allow this... Seems on the cloud we are going back to more manual work like these


author: Valerie Knapp
body: Hi [@Andy VAN BELLE](/t5/user/viewprofilepage/user-id/5357759) , thanks for your question.

You can export the Assets objects and then import them into the sandbox environment.

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

This would require you to create the Object schemas first

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

So, it is quite a manual process.

Here is the documentation for how to manage imports into Assets - <https://support.atlassian.com/jira-service-management-cloud/docs/import-objects-into-asset-in-jira-service-management/>

Here is the documentation about exports - <https://support.atlassian.com/jira-service-management-cloud/docs/export-objects/>

Basically, I would check the documentation to see what is allowed and then make a decision about the best approach for your specific case.

If you need more help or have other questions, just keep writing us here.

Cheers


Tags: cloud

jira-service-management

jira-service-management-cloud
Changing the default comment (internal instead public)
Asked by Maximilian Grabmayr:

Hi,

I am using JSM and have internal/external comments. When resolving, we have want to make the internal comments as standard to avoid wrong messages going out.

How can i configure this?

Thanks for your help

Max


Answers:
author: Nicolas Grossi
body: [@Maximilian Grabmayr](/t5/user/viewprofilepage/user-id/5408798) By default comments are not restricted.

Nicolas


author: Nicolas Grossi
body: [@Maximilian Grabmayr](/t5/user/viewprofilepage/user-id/5408798) Yes it is possible. You might take a look at this link information: <https://community.atlassian.com/t5/Jira-questions/Restriction-on-comments/qaq-p/2239909>

Nicolas

comments: author: Maximilian Grabmayr
body: i already have internal and external comments. as a standard, the user currently types the external comment. i would simply want to swap it so that the initial one is the internal comment...


Tags: cloud

jira-service-management

jira-service-management-cloud
How to delete the JSM link in the invitation mail
Asked by jinjing.tao:

Hi,

For the customer invitation email, is it possible to delete the message and link in the red box?

![??.png](/t5/image/serverpage/image-id/331004i3634390E82ECCA8B/image-size/large?v=v2&px=999 "??.png")


Answers:
author: Bruna Silva
body: Hello [@jinjing.tao](/t5/user/viewprofilepage/user-id/5525785),

Thank you for reaching out to Atlassian Community!

Currently, it's not possible to remove "*Powered by Jira Service Management* " from the **Customer invited** notification. However, we have a feature request suggesting this ability, as we can see below:

* [Allow customization of footer of "Customer invite" email](https://jira.atlassian.com/browse/JSDCLOUD-9887)

Please, feel free to click on "Vote for this issue" and add yourself as a watcher to be kept informed about the state of the feature moving forward.

For other customer notifications, you can customize this by editing the **Customer notification template**. Please follow the steps below to make adjustments according to your preferences:

* For *Company-managed* projects: Go to the *Project settings* page \> *Customer notifications* \> Click on *Edit templates*
* For *Team-managed* projects: Go to the *Project settings* page \> *Notifications* \> *Customer notifications* \> Click on *Edit templates*

More details about this can be found in the following document:

* [Change the look and feel of customer notifications](https://support.atlassian.com/jira-service-management-cloud/docs/change-the-look-and-feel-of-customer-notifications/)

:warning: Just note that this will apply to all **customer notifications** sent from the project.

If you have any other questions regarding this matter, please let us know.

Regards,  
**Bruna**

comments: author: jinjing.tao
body: Noted with many thanks!


Tags: cloud

jira-service-management

jira-service-management-cloud
Auto Triage with Atlassian Intelligence
Asked by Matthew Mathis:

The Ai Triage feature, in beta, is quite useful for support requests that are emailed in. I would like to auto triage all incoming support requests that come through email. Is this possible?


Answers:
author: Tushar Gohel
body: Hello [@Matthew Mathis](/t5/user/viewprofilepage/user-id/5525701)

Thank you for reaching out to the Atlassian community. You can give it a try following this article --\>

<https://www.atlassian.com/software/jira/service-management/product-guide/tips-and-tricks/agent-onboarding#diving-into-issues>

You can use Communicate with the customer and use Transition Issue from this document to do the Auto Triage.

Thanks,

Tushar


Tags: cloud

jira-service-management

jira-service-management-cloud
How do I add a comment to a subtask and reference subtasks fields in the comment?
Asked by Andrew Madar:

I know I can use for example {{issue.key}} but if I have a custom field for the subtask, what would be the smart value for it?

I tried a few things with no success:

{{fieldname}}

{{issue.subtask.fieldname}}

{{issue.fields.fieldname}}


Answers:
author: Mikael Sandberg
body: The smart value is either the field name or the custom field Id:

{{issue.fieldname}}

{{issue.customfield_XXXXX}}

Sub-tasks are treated the same way as a regular issue.

You can get the custom field Id if you go to Settings \> Issues \> Custom fields, locate the field and then hover over one of the options under the three dot menu. The URL that is shown contains the id.


Tags: cloud

jira-service-management

jira-service-management-cloud
Jira App works in tunnel, does not work with forge install
Asked by Ezekiel McCormack:

I have an app I've been building that currently is in the issue panel, It has a button that causes an Api call to create a Jira asset object.

The problem is that while it works exactly as intended with forge tunnel, It doesn't work when using it installed.  
The GUI is functional however the asset objects are not being made.

Does the forge tunnel feature have some sort of authentication or something that would allow my backend to be functional there, but not on the install?


Answers:
author: Ezekiel McCormack
body: My code lacked async and await, problem solved with this implemented.


author: Nicolas Grossi
body: [@Ezekiel McCormack](/t5/user/viewprofilepage/user-id/5525600) Welcome! As you have a Standard license you might want to contact support.atlassian.com

Nicolas


Tags: cloud

forge

install

jira-service-management

jira-service-management-cloud

tunnel