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?
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:
script:
# shrink bitbucket branch name to less than 63 characters
- branch="${BITBUCKET_BRANCH}"
- export BITBUCKET_BRANCH=${branch:0:62}
- pipe: atlassian/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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.