Giter VIP home page Giter VIP logo

Comments (5)

gabemontero avatar gabemontero commented on July 1, 2024

OK ... I think I've reproduced this, though some confirmation of the details would be good.
In particular, from the job output provided, I surmised that:

  1. Jenkins was not running in either of the projects involved in the tagging
  2. as such, you provided auth tokens for both the source and destination projects
  3. I took at stab and guessed you provided edit access of the destination project to the service account of the source project
  4. If so, I believe I saw the tagging work from scratch with v1.0.11, but not work with v1.0.12
  5. Conversely, if the image stream already existed, it failed with v1.0.11 (a known bug I fixed in v1.0.12), but worked with v1.0.12

Also, after reproducing, I was able to address the issue without having to make a code change to the plugin, but instead run an additional oc policy add-role-to-user command, adding edit access of the source project to the service account of the destination project (the inverse if you will for what I did in 3) above). When doing this, the tagging then worked for me (irregardless of whether the ImageStream previously existed or not) with v1.0.12.

With those details, and for handling the previous bug wrt the image stream existing, I believe this is the correct approach (updating the policy of the service account of each project), and I'll be updating the README.

@livelace - assuming my repro attempt sounds close enough to your env, please try adding edit access to the service accounts of each project to themselves as well as the project on the other side of the oc tag operation, and let me know the results.

from jenkins-plugin.

livelace avatar livelace commented on July 1, 2024

@gabemontero

Its works. Thanks. So we should give "edit" access to source and destination projects in future ?

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 1, 2024

Thanks for the confirmation @livelace . For now, the answer is "yes" to your question.

We do have some discussions going on in the background wrt our Jenkins scenarios and the various roles/bindings/access for the associated service accounts. I also want to circle back to this and experiment with varying the roles used, see if something less than edit is workable.

I'll keep this issue open until I minimally try those experiments, or if the background discussions I referenced reach a conclusion relatively soon.

from jenkins-plugin.

gabemontero avatar gabemontero commented on July 1, 2024

@livelace - finally circled back to this, and confirmed that each project's service account needs edit access to the other project. There are updates that occur to the source project's image stream as part of creating the destination tag.

from jenkins-plugin.

livelace avatar livelace commented on July 1, 2024

@gabemontero Thanks!

from jenkins-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.