The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

What is the correct 'LABELS' syntax in atlassian/aws-eks-kubectl-run pipe?

Saurabh Singh
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 4, 2021

What is the right way to add a 'LABELS' array with more than one entry in https://bitbucket.org/atlassian/aws-eks-kubectl-run/src/master/ pipe?

It fails with the following syntax:

---
LABELS:
- "{'bitbucket.org/bitbucket_tag':\"$BITBUCKET_TAG\"}"
- "{'bitbucket.org/bitbucket_build_number':\"$BITBUCKET_BUILD_NUMBER\"}"
- "{'bitbucket.org/bitbucket_commit':\"$BITBUCKET_COMMIT\"}"
---

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Oleksandr Kyrdan
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2021

Hi @Saurabh Singh  @Brad Vrabete 

Thank you for your question!

Yep, there was a bug in the pipe with LABELS array and now it is fixed.

A new version of the aws-eks-kubectl-run pipe released:

script:
  - pipe: atlassian/aws-eks-kubectl-run: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
      CLUSTER_NAME: 'my-kube-cluster'
      KUBECTL_COMMAND: 'apply'
      RESOURCE_PATH: 'nginx.yml'
      LABELS:
        - 'environment=production'
        - 'tier=backend'

 

LABELS:
Key=value pairs that are attached to a Deployment. Labels are intended to be used to specify identifying attributes of objects. Valid labels must follow Syntax and character set. Format: key=value. Example: bitbucket.org/bitbucket_branch=develop.


It would be nice if you provide us with more details about your experience with the aws-eks-kubectl-run pipe.

 

Cheers,
Oleksandr

Brad Vrabete
Contributor
February 18, 2021

@Oleksandr Kyrdan Indeed that change solves the issue; I was able to successfully add labels in the way you have described. 

0 votes
Brad Vrabete
Contributor
February 4, 2021

The syntax 

- "'bitbucket.org/bitbucket_tag'="$BITBUCKET_TAG\"" does not work either

What is the correct syntax for adding custom labels for this pipe?

TAGS
AUG Leaders

Atlassian Community Events