Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: release pipeline branch name with '/' issue #287

Closed

Conversation

nagenderRawat
Copy link

@nagenderRawat nagenderRawat commented Oct 18, 2020

Fixes the issue on release pipeline pod(on evaluation of BuildNumber) whenever release is made on branch name with / special character and jx gitops variables is a part of release pipeline STEP(with latest tekton catalog version, in-repo scheduler) like shown below.

        - args:
          - gitops
          - variables
          command:
          - jx
          image: gcr.io/jenkinsxio/jx-cli:latest
          name: jx-variables
          resources: {}

Error logs for the same issue for a release pipeline pod is shown below -:
error: failed to validate: failed to find build number: failed to find BuildNumber: failed to find PipelineActivity resources in namespace jx with selector lighthouse.jenkins-x.io/refs.org=org,lighthouse.jenkins-x.io/refs.repo=service,lighthouse.jenkins-x.io/branch=hello/test-jenkins-x: unable to parse requirement: invalid label value: "team/test-jenkins-x": at key: "lighthouse.jenkins-x.io/branch": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue', or 'my_value', or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')

Fixes the issue on release pipeline pod whenever release is made on branch name with `/` special character and `jx gitops variable` is a part of release pipeline step like shown below.
`
        - args:
          - gitops
          - variables
          command:
          - jx
          image: gcr.io/jenkinsxio/jx-cli:latest
          name: jx-variables
          resources: {}
`

Error logs for the same issue for a release pipeline pod is shown below -:
`error: failed to validate: failed to find build number: failed to find BuildNumber: failed to find PipelineActivity resources in namespace jx with selector lighthouse.jenkins-x.io/refs.org=org,lighthouse.jenkins-x.io/refs.repo=service,lighthouse.jenkins-x.io/branch=hello/test-jenkins-x: unable to parse requirement: invalid label value: "team/test-jenkins-x": at key: "lighthouse.jenkins-x.io/branch": a valid label must be an empty string or consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character (e.g. 'MyValue',  or 'my_value',  or '12345', regex used for validation is '(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])?')`
@jenkins-x-bot-test
Copy link
Contributor

Hi @nagenderRawat. Thanks for your PR.

I'm waiting for a jenkins-x or todo member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@jenkins-x-bot-test
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign rajdavies
You can assign the PR to them by writing /assign @rajdavies in a comment when ready.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@nagenderRawat
Copy link
Author

/assign @rajdavies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants