jx promote with private gitlab creates too long identifiers

Created on 1 Aug 2019  路  7Comments  路  Source: jenkins-x/jx

Summary

The step jx promote creates too long identifiers using private gitlab.
The created identifier is build from the gitlab url, the org and the repo name.
The combination of all these exceeds 63 characters and leads to an error message.

Steps to reproduce the behavior

jx promote -b --all-auto=false --timeout 1h --version 0.0.25 --env qa

Expected behavior

jx promotion works fine as it did work with jx version v1.3.1096

Actual behavior

promotion fails with the error:
error: PipelineActivity.jenkins.io "aaaaaaaaaaaaaaaa-jxtest-draft-master-1" is invalid: metadata.labels: Invalid value: "git-aaaaaa-aaaaaa-aaaaaaaaa-aaaaaaaa-aaaaaaaaaaaaaaaa-jxtest-draft-git": must be no more than 63 characters

Jx version

The output of jx version is:

NAME               VERSION
jx                 2.0.540
jenkins x platform 2.0.718
Kubernetes cluster v1.14.1
kubectl            v1.15.0
helm client        Client: v2.11.0+g2e55dbe
git                git version 2.17.1
Operating System   Ubuntu 18.04.2 LTS

Jenkins type

  • [ ] Serverless Jenkins X Pipelines (Tekton + Prow)
  • [x] Classic Jenkins

Kubernetes cluster

Cluster setup with kubespray

Operating system / Environment

ubuntu/ coreos

Jenkins-X static jenkins

arejenkins aretekton kinbug lifecyclrotten prioritimportant-soon

Most helpful comment

We're checking the Pipeline etc CRDs to make sure they're not too long, but apparently we're not for PipelineActivity names. So we should do that.

All 7 comments

We're checking the Pipeline etc CRDs to make sure they're not too long, but apparently we're not for PipelineActivity names. So we should do that.

I'm having the same problem. Is there some something I could do myself to work around the problem without having to rename my github repository?

@abayer I found another one:

~/bin/jx/jx-v2.0.834 promote -b --all-auto=false --timeout 1h --version 0.0.53-SNAPSHOT-staging-23 --env staging

Promoting app aaaaaaaa-service version 0.0.53-SNAPSHOT-staging-23 to namespace staging
pipeline microservices/aaaaaaaa-service/staging
WARNING: No changes made to the source code in /path/to/.jx/environments/staging. Code must be up to date!
WARNING: failed to parse git provider URL [email protected]:microservices/aaaaaaaa-service.git: parse [email protected]:microservices/aaaaaaaa-service.git: first path segment in URL cannot contain colon
ERROR: Error trying to create missing sourcerepository object: failed to update SourceRepository microservices-aaaaaaaa-service: SourceRepository.jenkins.io "microservices-aaaaaaaa-service" is invalid: metadata.labels: Invalid value: "git-aaaaaa.aaaaaa.aaaaaaaaa.aaaaaaaa-microservices-aaaaaaaa-service-git": must be no more than 63 characters

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://jenkins-x.io/community.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

@jenkins-x-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.
Provide feedback via https://jenkins-x.io/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository.

Was this page helpful?
0 / 5 - 0 ratings