Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Default labels

When using BitBucket in conjunction to Jira, creatig a branch name from a JIRA ticket might exceed the 63 character limit of a Kubernetes label. Could the atlassian/aws-eks-kubectl-run be updated to truncate long branch names and make sure the labels are valid for Kubernetes?

1 answer

0 votes

Hi @Brad Vrabete . Thanks for your question. We will discuss with the team this case. 
Unfortunately, i am not sure about automatic truncation of the branch. Instead maybe we will add validation or warn users in readme about character limit and provide your solution from this thread:

# shrink bitbucket branch name to less than 63 characters
  - branch="${BITBUCKET_BRANCH}"
  - export BITBUCKET_BRANCH=${branch:0:62}
  - pipeatlassian/aws-eks-kubectl-run:2.1.0  

Regards, Igor. 

That is a label, metadata. These longer label are automatically generated by a Jira based workflow, not manually and they are a truncation of the Jira ticket name. Ideally they should not be generated that long. 

In any case, I will be truncating branch names before applying the kubectl command.

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events