Extended choice parameter plugin + Scripted Pipeline (Parallel) issue

34 views
Skip to first unread message

xwyxw

unread,
Sep 3, 2017, 10:08:27 PM9/3/17
to Jenkins Users
I am having a rough time findout what is going on with weird behavior,  when I use  Scripted Pipeline (Parallel) and Extended choice parameter  plugin. Everything seams okay as long as I do not select Yes on "Save Artifacts Externally?" option. If that happen I endup getting nonsense errors like.

ERROR: Workspace has a .git repository, but it appears to be corrupt.
[W] hudson.plugins.git.GitException: Error performing command: C:\Program Files\Git\cmd\git.exe rev-parse --is-inside-work-tree


JSON Parameter Config Groovy Script

import org.boon.Boon;

def jsonEditorOptions = Boon.fromJson(/{
disable_edit_json: true,
        disable_properties: true,
        no_additional_properties: true,
        disable_collapse: true,
        disable_array_add: true,
        disable_array_delete: true,
        disable_array_reorder: true,
        show_errors: "always"
        theme: "bootstrap3",
        iconlib:"fontawesome4",
        schema: {
                 "title": "Save Artifacts Externally?",
                 "oneOf": [
                 {
                     "title": "No",
                     "type": "null",
                     "options": {
                         "disable_collapse": true,
                         "disable_edit_json": true,
                         "disable_properties": true,
                          "theme": "bootstrap3",
                          "show_errors": "always"
                       }
                  },
                  {
                      "title": "Yes",
                      "type": "object",
                      "properties": {
                          "copypathType": {
                               "title": "Path",
                               "type": "string"
                           }
                       }
                  }]
         }
}/);


Pipeline Script

#!groovy

try {
    CheckoutRepos()
} catch(e) {
    NotifyFail()
    throw e
}

def CheckoutRepos() {
    stage('Checkout') {
        parallel 'W': {
            node {
                checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: "${env.GIT_W_BRANCH}"]], browser: [$class: 'GitLab', repoUrl: 'http://gitlab.local/', version: '8.13'], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 0, noTags: true, reference: '', shallow: true]], extensions: [[$class: 'CleanBeforeCheckout']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '1c228aa2-4af0-4026-b376-7244e2336083', url: 'g...@gitlab.local:f/W.git']]]
            }
        }, 's': {
            node {
                checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: "${env.GIT_S_BRANCH}"]], browser: [$class: 'GitLab', repoUrl: 'http://gitlab.local/', version: '8.13'], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 0, noTags: true, reference: '', shallow: true]], extensions: [[$class: 'CleanBeforeCheckout']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '1c228aa2-4af0-4026-b376-7244e2336083', url: 'g...@gitlab.local:f/s.git']]]
            }
        }, 'C': {
            node {
                checkout changelog: false, poll: false, scm: [$class: 'GitSCM', branches: [[name: "${env.GIT_C}"]], browser: [$class: 'GitLab', repoUrl: 'http://gitlab.local/', version: '8.13'], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'CloneOption', depth: 0, noTags: true, reference: '', shallow: true]], extensions: [[$class: 'CleanBeforeCheckout']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '1c228aa2-4af0-4026-b376-7244e2336083', url: 'g...@gitlab.local:f/c.git']]]
            }
        }
    }
}
Reply all
Reply to author
Forward
0 new messages