Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    jf1983
    @john-fletcher
    can someone give me the Job DSL script on generate freestyle job with allure plugin for reports
    Raddadi Mehdi
    @eclar
    hello, do you know where I could find an example of using the job dsl to get the projects from a github organization and create the multibranches pipelines ? :)
    Gordon Franke
    @gimler

    @eclar actually i have this

          organizationFolder('d060631') {
              description('Personal repository for Gordon Franke (d060631)')
              displayName('Gordon Franke')
              triggers {
                  periodic(2400)
              }
              organizations {
                  github {
                      repoOwner("badman")
                      apiUri("https://api.github.com")
                      credentialsId('github')
                      traits {
                          headWildcardFilter {
                              includes("jenkins-pipeline")
                              excludes("")
                          }
                      }
                  }
              }
              projectFactories {
                  workflowMultiBranchProjectFactory {
                      scriptPath("Jenkinsfile")
                  }
              }
          }

    now i hang on the behaviours i found thie following
    https://github.com/jenkinsci/configuration-as-code-plugin/blob/master/demos/jobs/bitbucket.yaml#L41

    sathya1104
    @sathya1104

    Hello team,
    ignoreCommitterStrategy (part of git plugin) doesn't pick ignoredAuthors from multibranch generator job (i.e, job-dsl way).

    Below is the code which I tried inside my seed job
    buildStrategies {
    ignoreCommitterStrategy {
    ignoredAuthors("sathya@xyz.com")
    allowBuildIfNotExcludedAuthor(false)
    }
    }

    Note: Had even tried with "au.com.versent.jenkins.plugins.ignoreCommitterStrategy"

    After running seed job (i.e., multibranch generator job) I could see ignoreCommiter Strategy reflecting in existing multibranch pipeline jobs but still ignoredAuthor is not added. It means at this moment inside multibranch pipeline jobs -> config I have to manually click on Add button and add ignored author list manually which is bit painful as we have many jobs.

    Any help on this is really appreciated.

    tschlue
    @tschlue
    Hi
    the multibranchPipelineJob option 'branchDiscoveryTrait ' in the branchSources doesn't work is there a trick?
    I get the following error:
    ERROR: Found multiple extensions which provide method branchDiscoveryTrait with arguments [jobs.JenkinsFileJob$_create_closure1$_closure3$_closure11$_closure12$_closure13$_closure14$_closure15@29dddaa]: [[com.cloudbees.jenkins.plugins.bitbucket.BranchDiscoveryTrait, jenkins.plugins.git.traits.BranchDiscoveryTrait, org.jenkinsci.plugins.github_branch_source.BranchDiscoveryTrait]]
    Jamie Jackson
    @jamiejackson

    i generated this with the xml to dsl plugin, but it doesn't work. it's the first seed job i've tried to create that has an "inline" pipeline definition: https://gist.github.com/jamiejackson/aea41c3358ab15217fd5139d78186450

    how do i get that to work?

    hmm, reading up, i suppose that this room is dead.
    Jamie Jackson
    @jamiejackson
    that works.
    dsakilesh
    @dsakilesh

    @jamiejackson @tschlue @sathya1104 @gimler @eclar @john-fletcher
    I need your suggestion here.
    JCasc traits configuration is needed for "scan by webhook" trigger in jenkins DSL. We are using bitbucket here.
    Currently we have periodic scan and we want to use the "scan by webhook" trigger function. Below is the periodic trigger syntax:

    it / 'triggers' << 'com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger'{
    spec ' *'
    interval "60000"
    }
    Could you please provide/suggest us the similar syntax for "scan by webhook" trigger? Thanks in advance!

    tschlue
    @tschlue
    @dsakilesh Sorry, I don't work with JCasc at the moment and can't help you.
    Michael
    @emanuelelevo_gitlab
    Hi
    do you guys know how to escape variables with curly brackets under shell? E.g.
    --junitxml="BUILD_\${BUILD_ID}_RESULTS.xml
    Its not enough:
    Caught unhandled exception with ID bffcbf9c-d4c3-4393-bc44-1c035b345b6b org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: script: 19: unexpected char: '\' @ line 19, column 70. adless true --junitxml="BUILD_\_RESULTS.
    version: job-dsl:1.77
    rtp
    @redturtlepower
    Hi! The docs (at https://github.com/jenkinsci/job-dsl-plugin/wiki/Migration) don't say how to specify the overrideUrl for the Bitbucket plugin.
    I have guessed the line "overrideUrl(...)". I haven't tested it yet...
    version: job-dsl: 1.77
    - script: >
          pipelineJob('hello-world-server') {
              properties{
                  pipelineTriggers{
                      triggers{
                          bitbucketPush()
                          overrideUrl('https://bitbucket.org/MyRepo/hello-world-server')
                      }
                  }
              }
              // ... the definition comes here       
          }
    rtp
    @redturtlepower
    FIgured out the real definition:
    triggers{
      bitbucketPush{
        overrideUrl('https://bitbucket.org/MyRepo/hello-world-server')
      }
    }