youngmon/atlassian-qna huggingface dataset:
Pipeline error - ElasticBeanstalk Worker
Asked by Breno:

Pipeline version: atlassian/aws-elasticbeanstalk-deploy:1.0.0

Using version 1.0.0 of the pipeline results in error when trying to publish to an elastic beanstalk which is of type [worker environment](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-worker.html).  
I suppose that the error is due to worker environments do not have a CNAME.  
If I use version 0.8.0, I don't get an error.

[Web server environments](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/concepts-webserver.html) work on both versions.

Version 1.0.0

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

Version 0.8.0

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


Answers:
author: Oleksandr Kyrdan
body: Hi [@Breno](/t5/user/viewprofilepage/user-id/49792)

Thank you for your question!

Yep, it looks like a bug. We'll fix it and release a new version and notify you.

Best regards,  
Oleksandr Kyrdan


author: Oleksandr Kyrdan
body: Hi [@Breno](/t5/user/viewprofilepage/user-id/49792)

The new version with fix released:

```
script:  - pipe: atlassian/aws-elasticbeanstalk-deploy:1.0.1    variables:      AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID      AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY      AWS_DEFAULT_REGION: 'us-east-1'      APPLICATION_NAME: 'my-app-name'      ENVIRONMENT_NAME: 'production'      ZIP_FILE: 'application.zip'
```

Welcome to share your feedback!  

Cheers,  
Oleksandr Kyrdan

comments: author: Breno
body: I've already tested it and it's working like a charm.

Thank you.


Tags: aws

beanstalk

bitbucket-pipelines

cloud

elastic
Run Yaml anchor based on your input
Asked by BHARATHKUREK:

Hello Everyone,

Is it possible right now to call the yaml anchor based on the user Input given.

For example: Lets say we have to give input as 'A' i should call Build, if i give input as 'B' , we should cal\\run Build, dockerimage.

This i tried by giving user-input but i am not able to run the yaml anchors.

let me know your thoughts.

Thanks


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

At the moment it is possible to give user input in custom pipelines only, you can check our documentation [here](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/) (search for the 'variables' keyword).

I'm afraid that it is not possible to do that with yaml anchors and non-custom pipelines yet.

I found the following feature request in our issue tracker:

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

I believe that this is what you are looking for? If so, I would suggest that add your vote in the feature request (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.

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

Kind regards,  
Theodora

comments: author: BHARATHKUREK
body: [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) No both either documentation [here](https://support.atlassian.com/bitbucket-cloud/docs/configure-bitbucket-pipelinesyml/) (search for the 'variables' keyword) and BCLOUD-1955 are not my goal.

consider taskA and taskB as yaml anchors i can call when we need based on condition,simple if loop i have given as a use case.

let say i have 2 methods  
taskA()  
taskB()

When the bitbucket pipeline ask userinput if i enter 'A' or 'B' or 'C' it should perform the respective task

if (userinput == 'A')  
taskA  
else if (userinput == 'B')  
taskB  
else (userinput == 'C')  
taskA  
taskB

Thanks


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

Thank you for your input and for explaining your use case.

Bitbucket Pipelines is based on YAML, and I am not sure if YAML allows using anchors inside commands like in the example you gave.

I would suggest opening a feature request about this in our [issue tracker](https://jira.atlassian.com/secure/Dashboard.jspa) (including your explanation and use case) for our development team to consider, if this is possible.

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Run multiple commands in the remote server after a SCP deploy
Asked by sachinthasankalpa:

Hi

I'm trying to deploy a Laravel application using SCP deploy to a server. After deploying, I want to run multiple commands like

```
php artisan migrate
php artisan config:cache
```

in the deployed server. How can I achieve this.

Thank you.


Answers:
author: Oleksandr Kyrdan
body: Hi [@sachinthasankalpa](/t5/user/viewprofilepage/user-id/4454106)

Thank you for your question!

It's a good case to use [ssh-run](https://bitbucket.org/atlassian/ssh-run) pipe, so you could run a command or a bash script on your server )

```
script:  - pipe: atlassian/ssh-run:0.3.0    variables:      SSH_USER: 'ec2-user'      SERVER: '127.0.0.1'      SSH_KEY: $MY_SSH_KEY      MODE: 'script'      COMMAND: 'myscript.sh' # path to a script in your repository
```

Also, we have [scp-deploy](https://bitbucket.org/atlassian/scp-deploy) pipe:

```
script:  - pipe: atlassian/scp-deploy:1.0.1    variables:      USER: 'ec2-user'      SERVER: '127.0.0.1'      REMOTE_PATH: '/var/www/build/'      LOCAL_PATH: 'build/*'
```

More pipes you could find on [Bitbucket Pipes Marketplace](https://bitbucket.org/product/features/pipelines/integrations).

Cheers,  
Oleksandr Kyrdan

comments: author: sachinthasankalpa
body: Hi [@Oleksandr Kyrdan](/t5/user/viewprofilepage/user-id/2885705)

This's what I was expecting.

Thank you.


Tags: bitbucket-pipelines

cloud

deployment

laravel

scp
Git authentication not working when using RSA, but works if using ED25519
Asked by dacucar:

Is it still possible to use RSA keys for SSH authentication in bitbucket?  

I've been using bitbucket since a while back and I have been using a Yubikey+GPG+gpgagent to authenticate against my bitbucket repositories. One day, it suddenly stopped working while still working on other git cloud repository providers. Public key was the same and I tested on different computers.  

After some investigation I realized that the problem was not the Yubikey or the fact that I was using \`gpgagent\`.  

\* If I generate a ssh-key with \`ssh-keygen -t rsa\` and I add the public key to my SSH keys, I can't use it for authentication.  
\* If I generate a ssh-key with \`ssh-keygen -t ed25519\` then everything works fine.  

<br />

<br />


Answers:
author: Ben
body: G'day!

The RSA SHA-1 hash algorithm is being quickly deprecated across operating systems and SSH clients because of various security vulnerabilities, with many of these technologies now outright denying the use of this algorithm. For example, here is a link to an announcement from OpenSSH mentioning the same:  
<https://www.openssh.com/txt/release-8.2>

In order to re-enable ssh-rsa support, inserting the following line into the affected SSH client's config file can re-enable this algorithm:  

    PubkeyAcceptedKeyTypes +ssh-rsa

Please note that this is **not** a recommended solution and we would recommend using **ECDSA** and **ED25519**hash algorithms instead.

Cheers!

- Ben (Bitbucket Cloud Support)


Tags: bitbucket-cloud

cloud

ssh
Deployment unable to load atlassian/bitbucket-pipe-release:4.0.1 locally
Asked by Po Lui:

I have a simple pipeline that outputs an artifact. But when I define a deployment I get unable to load error.


Answers:
author: Halyna Berezovska
body: [@Po Lui](/t5/user/viewprofilepage/user-id/1219570) could you please share your Full log?

It is just warning that image is not found locally and it is downloaded after.

Regards, Galyna

comments: author: Halyna Berezovska
body: Also share the pipeline paty, how you use this pipe.

Example:

```

  step:
    name: Push and Tag
    script:
      - pipe: atlassian/bitbucket-pipe-release:4.0.1
        variables:
          DOCKERHUB_USERNAME: <dockerhub username>
          DOCKERHUB_PASSWORD: $DOCKERHUB_TOKEN_SECRET_VAR
          IMAGE: 'prod-image-of-something'
    services:
      - docker
```

Regards, Galyna


Tags: bitbucket-pipelines

cloud
How to enable and get the pipelines working in a workspace
Asked by Ashok Masimukku:

1. When I go to pipelines in a repo I get the below error  
**Pipelines is currently disabled for this repository. Enable it in the settings to start building again.**   
**[Go to settings](https://bitbucket.org/gprcorp/gprlog/admin/addon/admin/pipelines/settings)**

2. When I go to settings and enable pipelines I get the following error

![pipelines-error.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/148977iC83498D6E6E12E0B/image-size/large?v=v2&px=999 "pipelines-error.PNG")


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

I believe that the error you are seeing may be related to this bug:

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

The Bitbucket account with the same email as your community account has access to a workspace where the option "*Require two-step verification*" is enabled. This is a personal workspace and the user owning this workspace doesn't have 2FA enabled in their Bitbucket account, which prevents Pipelines from running (this is a bug).

Could you please ask the user who owns the workspace of this repo to enable 2FA in their Bitbucket Cloud account, as per the following doc?

<https://support.atlassian.com/bitbucket-cloud/docs/enable-two-step-verification/>

This should allow you to enable Pipelines and run builds in repos of this workspace.

Please feel free to let me know how it goes and if you need further assistance.

Kind regards,  
Theodora

comments: author: Ashok Masimukku
body: We did the 2FA with the account that owns the workspace, but it is still showing the same error


author: Theodora Boudale
body: Hi [@Ashok Masimukku](/t5/user/viewprofilepage/user-id/4407578),

I checked in our system, and I see that 2FA is still disabled for the Bitbucket user associated with the workspace.

I cannot share the user's username or email here due to our privacy policy, and I was about to open a support ticket for you, when I saw that you have already opened one.

I have contacted the engineer working on your support ticket, and they'll provide you with the necessary details.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
How do we force passphrases in ssh keys?
Asked by Nate Case:

Hello,

Is there a way to force ssh keys to that have access to our Bitbucket cloud instance to use passphrases?

Also is there a place that logs the use of our current SSH keys in bitbucket cloud?

<https://bitbucket.org/littlerapps>


Answers:
author: Mark C
body: Hi [@Nate Case](/t5/user/viewprofilepage/user-id/1207536)   

Please allow me to answer your questions:
> Is there a way to force ssh keys to that have access to our Bitbucket cloud instance to use passphrases?

I'm afraid creating/generating SSH keys are based on the client-side and It's not possible to do that on the server-side at the moment.  
For now, I've gone ahead and created a feature request for it that can be located through this link. - <https://jira.atlassian.com/browse/BCLOUD-21182>

As a workaround and added security, you can use the below **Premium** features for your workspace:

* **Requiring two-step verification**: Require that the users who can access your private content are only able to view or interact with that content if they've enabled two-step verification.
* **Allowlisting IP addresses**: Restrict access of your private content to users on certain IP addresses.

**Reference** : [Control access to your private content](https://support.atlassian.com/bitbucket-cloud/docs/control-access-to-your-private-content/)
> Also is there a place that logs the use of our current SSH keys in bitbucket cloud?

Currently, you can see the "**Last used**" date field for your SSH key under your workspace settings.

1. Go to your workspace
2. Click **Settings**
3. Click **SSH keys**

For better logging of SSH keys usage, I've also created a feature request for it here. - <https://jira.atlassian.com/browse/BCLOUD-21183>

You can upvote and watch those feature request tickets for now so that you'll be notified of any updates from our product team.  
![](https://getsupport.atlassian.com/images/icons/emoticons/information.png) Please do note that we don't have an exact ETA on those new features as all new features will be implemented according to our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

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

Regards,  
Mark C


Tags: bitbucket-cloud

cloud
Error using aws-elasticbeanstalk-deploy with worker
Asked by Luke Way:

Just upgraded to 1.0.0 and encountered the following when deploying to one of my environments:
> Traceback (most recent call last):  
> File "/pipe.py", line 267, in <module>  
> pipe.run()  
> File "/pipe.py", line 255, in run  
> deploying_environment = self.deploy()  
> File "/pipe.py", line 179, in deploy  
> url = environments['Environments'][0]['CNAME']  
> KeyError: 'CNAME'

This most likely happens because this particular environment is a worker with no public URL.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Luke Way](/t5/user/viewprofilepage/user-id/361898)

Thank you for your question!

Yep, it looks like a bug. We'll fix it and release a new version and notify you.

Best regards,  
Oleksandr Kyrdan


Tags: aws

beanstalk

bitbucket-pipelines

cloud

elastic
Pull Request Guidelines don't seem to be working
Asked by Claude_Camire:

The <https://prguidelines.services.atlassian.com/> seem not work, is it the case? Does he have a way to use the guidelines in pull request without this service? Thanks.


Answers:
author: Caroline R
body: Hi, Claude!

Indeed, the [https://prguidelines.services.atlassian.com](https://prguidelines.services.atlassian.com/) is currently unavailable because the **PR Guidelines** functionality was discontinued on June 8th. The decision was made due to low adoption and usage.

The discontinuation was announced in the following article:

* [PR Guidelines Functionality Discontinuation Notice](https://community.atlassian.com/t5/Bitbucket-articles/PR-Guidelines-Functionality-Discontinuation-Notice/ba-p/1700276)

Please, feel free to share any additional questions or concerns regarding this subject.

Kind regards,  
Caroline


Tags: bitbucket-cloud

cloud

guideline

pull-request
aws-ecr-push-image does not tag images based on the image name
Asked by Gabriel Bellon:

Hello,

I'm using \`atlassian/aws-ecr-push-image:1.4.1\` to push an image to my ECR repository, after setting the image name with the pattern \`image_name:tag\` the result in my repository was an image with the \`latest\` tag thus not using the image name pattern.

Here is the part of my pipeline configuration that reflects this behaviour:

````
```
 - step: name: 'Build' 
   script: 
   - docker build -t super-test:${BITBUCKET_BRANCH}-${BITBUCKET_COMMIT} . 
   - pipe: atlassian/aws-ecr-push-image:1.4.1 
     variables: 
       AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID 
       AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY 
       AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION 
       IMAGE_NAME: super-test:${BITBUCKET_BRANCH}-${BITBUCKET_COMMIT} 
       TAGS: '${BITBUCKET_BRANCH}-${BITBUCKET_COMMIT}'
````

Just after setting the \`TAGS\` attribute, the correct image name with the desired pattern was created.

This is kinda misleading while reading the examples and documentation.


Answers:
author: Oleksandr Kyrdan
body: Hi [@Gabriel Bellon](/t5/user/viewprofilepage/user-id/4227876)

Thank you for your question!

It's a good time to update pipe's Readme!

We'll update the pipe and notify you.

Cheers,  
Oleksandr Kyrdan


Tags: aws

bitbucket-pipelines

cloud
User initiated Bitbucket Deployment based on a tag
Asked by Steve Calvert:

Bitbucket cloud allows be to manually run a deployment, but the dialog that is presented only allows me to choose the branch to deploy.

It seems an obvious omission not to present an option to deploy based on a specific tag. Is there a way to do this?  


Answers:
author: Theodora Boudale
body: Hi Steve,

I assume that you are referring to the "Run pipeline" option that is available on the Pipelines page of a repo?

This option indeed only allows you to run a pipeline manually on a branch only.

If you'd like to manually run a pipeline on a tag, you can:

1. Go to the **Commits** page of the repo
2. Search for the tag and then open the commit with this tag
3. On the commit page, you'll see the option "Run pipeline" in the right-hand column
4. If you select that, you'll see a dialog with all pipelines available in this repo and select which one you want to run for the commit with this tag

We have a feature request to add the ability to select a tag in the "Run pipeline" option of the Pipelines page of a repo:

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

If this is what you're looking for, 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.

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

Kind regards,  
Theodora


Tags: bitbucket-cloud

bitbucket-pipelines

cloud
Can't receive email Invite to repository
Asked by silchenko:

Hi.

My team manager inviting me to repository.

But I couldn't get invitation email never.

I've also checked spam mail box as well.

But no mails get arrived from bitbucket.org

Please help me to solve this problem.

The mail is the one that my atlassian account is registered to.

Thank you.

Serhii.


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

Is the email where the invitation was sent the same as the email of your community account, that you used to create this question?

I checked this email in our system and I don't see it listed in any of the email suppression lists.

Checking our email logs for the last 7 days, I can see that one mail from Atlassian was sent to your email address yesterday, which shows as delivered. However, the details show that this is a sign-up/verification email, and not a Bitbucket invitation.

Could you please ask your team manager to resend the invitation and let you know the date+time they resent it?

Then please let me know the date and time plus timezone (OR you can convert it to UTC if you don't want to post the timezone here for privacy reasons: <https://savvytime.com/converter/utc>) when the invitation was resent.

I can then check our logs again for any events regarding this new invitation.

Kind regards,  
Theodora

comments: author: silchenko
body: Thank you, Theodora

The invitation was resent on 6/25 at 15:23:26 UTC


author: Theodora Boudale
body: Hi Serhii,

Thank you for the info.

I still cannot see any Bitbucket invitations sent to your email address, but I believe I may have found the culprit.

I found in our system the Bitbucket Cloud workspace owned by your company and I can see the invitations sent for this workspace.

Your email is listed there, however, it is misspelled. Specifically, an 'e' is missing from the domain name of the email in the invitation, which I believe is the reason why you are not receiving it.

Could you please ask your team manager to remove this specific invitation with the misspelled email and send a new one to the correct email address?

Kind regards,  
Theodora


author: silchenko
body: Thank you, Theodora

The issue is solved now. Great job!


author: Theodora Boudale
body: You are very welcome Serhii, good to hear that the issue is resolved.

I'm glad to have helped, please feel free to reach out if you ever need anything else!

Kind regards,  
Theodora


Tags: bitbucket-cloud

cloud
YAML anchors and variables - code reuse question
Asked by inger_klekacz:

So, I'm familiar with the use of YAML anchors to create a "default" step, like so:

```
definitions:
  steps:
    - step: &baseline-step
        name: Build Front-End app on non-master branch
        script:
          - echo "hello world"


branches:
  master:
    - step:
        <<: *baseline-step
        name: Build Front-End app on Master branch
```

But I'm not quite sure how to use variables in this context.

For example, I have 3 or 4 tasks that use exactly the same code, except that the object name is different, or a keyword arg value is different. I want to do something like this:

```
definitions:
  steps:
    - step: &baseline-step
        name: Build Front-End app on non-master branch
        script:
          - echo "hello world"
          - ./my_script.sh -i $MY_VAR


branches:
  master:
    - step:
        <<: *baseline-step
        name: Build Front-End app on Master branch
        MY_VAR: Prod          # would generate './my_script.sh -i Prod'
  dev:
    - step:
        <<: *baseline-step
        name: Build Front-End app on Dev branch
        MY_VAR: Dev           # would generate './my_script.sh -i Dev'
```

I feel like I'm misunderstanding variables. Like, there's a missing piece here. My goal is code reusability, but it seems like without enabling...Deployments, maybe?...I can't use variables.

**Can someone explain to me how to achieve this?** I'm not the first person to ask this question, and it seems that nobody else has gotten a clear answer on this, either:

- [YAML-anchors-Overriding-Reusing-deployment-variables](https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/YAML-anchors-Overriding-Reusing-deployment-variables/qaq-p/1367117)

- [Variables-per-step-yaml-anchors/](https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Variables-per-step-yaml-anchors/qaq-p/1237494)

- [Is-it-possible-using-YAML-anchors-to-define-variables-that-you](https://community.atlassian.com/t5/Bitbucket-Pipelines-questions/Is-it-possible-using-YAML-anchors-to-define-variables-that-you/qaq-p/1497035)


Answers:
author: BHARATHKUREK
body: [@inger_klekacz](/t5/user/viewprofilepage/user-id/4031091) you can use if loop to change the variable value based on your condition, so based on the condition satisfied $MY_VAR will pick that value and perform the action.


Tags: bitbucket-pipelines

cloud