Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65174

Inconsistent handling of secret token

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • gitlab-plugin
    • None

      Basically, I'm looking for a programmatic way of assigning or automatically generating, saving and retrieving the secret token for GitLab web hooks. We use Jenkins Job Builder, which does populate the secret token, but the token isn't usable until a user manually clicks the "apply" button. Afterwards, if Jenkins Job Builder is ran, again, the token is overwritten and broken. Diving in deeper:

      Information about Jenkins Job Builder from documentation:

      ...

      After running JJB, the expected token exists in the webpage and if the config.xml is downloaded, I can see:

      However this results in a error 500 when running the webhook. If a user then clicks "Apply", the config.xml becomes:

      The value in secretToken is different for each job and even different for the same job after re-running JJB and, again, hitting "Apply".  Effectively, I'm trying to migrate thousands of Jenkins Jobs to use a new repository location, but if JJB is re-ran for any reason, even manual assignment of web hook secrets are cleared. I'm not seeing a path forward.

      Options?

       

            jequals5 Marky Jackson
            halverneus Jeromy
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: