Giter VIP home page Giter VIP logo

Comments (8)

akram avatar akram commented on July 20, 2024

@jonesbusy can you give more context and explain what you are trying to achieve?
If I understand correctly, you are telling also it is working correctly for an oc 4.6 based image, but not working anymore for images older than that?

from jenkins-client-plugin.

jonesbusy avatar jonesbusy commented on July 20, 2024

Hi @akram It works for oc 4.6 but not above (4.7 until 4.11). I didn't test bellow 4.6.

What I'm trying to achieve is update my oc from 4.6 to more recent version.

from jenkins-client-plugin.

jonesbusy avatar jonesbusy commented on July 20, 2024

Code snippet that work on OC 4.6 but not more recent version like 4.7

def selector = openshift.selector('secret', 'my-secret')
if (selector.exists()) {

}

The exists() throw

09:23:06  ERROR: Unable to retrieve object names: selector([name=null],[labels=null],[namelist=[secret/my-secret]],[projectlist=null]); action failed: {err=, verb=get, cmd=oc --server=[https://*********:443](https://******/) --certificate-authority=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt --namespace=*********** --token=XXXXX get secret/my-secret -o=name , out=Error from server (NotFound): secrets "my-secret" not found

When I expect 'false' if the secret doesn't exist

You can see on the command it doesn't use the '--ignore-not-found'.

By activating TRACE log I can see this

Feb 11, 2022 9:03:26 AM FINE com.openshift.jenkins.plugins.OpenShiftDSL
getCapabilities return from oc help get flags cannot be placed before plugin name: --server=https://******:443

from jenkins-client-plugin.

openshift-bot avatar openshift-bot commented on July 20, 2024

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

from jenkins-client-plugin.

jonesbusy avatar jonesbusy commented on July 20, 2024

/remove-lifecycle stale

from jenkins-client-plugin.

pjanouse avatar pjanouse commented on July 20, 2024

/remove-lifecycle stale

from jenkins-client-plugin.

pjanouse avatar pjanouse commented on July 20, 2024

Issue isn't fixed by referenced PR. The issue is still here and affects Jenkins client plugin including version 1.0.37.

As far as I know, the last working OCP cli version is 4.6.60 (tested recently).

from jenkins-client-plugin.

jonesbusy avatar jonesbusy commented on July 20, 2024

Mhhh

1.0.37 was released 6 months ago so before this PR was merged.

This plugin is not built via https://ci.jenkins.io so I have so idea where to find the incremental .hpi for this PR.

The workarround of this issue is to

openshift.capabilities.ignoreNotFound = true

On my jenkins global library.

Regards,

from jenkins-client-plugin.

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.