Giter Club home page Giter Club logo

Comments (3)

haysclark avatar haysclark commented on June 12, 2024

Somewhat related PR - jenkins-x-plugins/jx-gitops#287

from jx.

haysclark avatar haysclark commented on June 12, 2024

In regards to this error example:

error: failed to validate: failed to find build number: failed to find BuildNumber: failed to lazily create 
PipelineActivity myorg-github-private-pr-1-1: PipelineActivity.jenkins.io "myorg-github-private-pr-1-1"
is invalid: metadata.labels: Invalid value: ".github-private": 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])?')

The source of the issue appears to stem from the normalizing of names and/or labels in the PipelineRun which results in an error downstream when the logic tries to generate a PipelineActivities and can not find any PipelineRuns with a matching repo name.

When digging down the logic, it seems like much of the code paths end up using the ToValidValue helper method in the naming module of jenkins-x/jx-helpers, which ends up stripping characters like ..

.e.g. the name or label generated for repo: github.com/myorg/.github-private.git ends up being myorg-github-private

What I experienced locally, is that JX3 correctly triggers a PipelineRun for the .github-private repo, which functions as expected. However, no PipelineActivity k8 object is never generated as that logic fails to find a PipelineRun for .github-private as all the PipelineRun labels have been sanitized too: github-private.

At least that is what appears to be occurring...

from jx.

haysclark avatar haysclark commented on June 12, 2024

The workaround we are currently using is simply to use GitHub Actions for linting the .github and .github-private repos. The repos are still imported into JX3; however, I've removed the .lighthouse folder so that we can still utilize JX3 for ChatOps.

from jx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.