Code Monkey home page Code Monkey logo

job-dsl-plugin's People

Watchers

 avatar

Forkers

robertski

job-dsl-plugin's Issues

Doesn't sets parameterizedSelfPromotion

Hello,

Here job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/promotions/ConditionsContext.groovy
is mistake.
It is:
void parameterizedSelfPromotion(Boolean evenIfUnstable, String parameterName, String parameterValue) {
parameterizedSelfPromotion = true
if (evenIfUnstable) {
this.parameterizedSelfPromotion = evenIfUnstable
}

It should be:
void parameterizedSelfPromotion(Boolean evenIfUnstable, String parameterName, String parameterValue) {
isParameterizedSelfPromotion = true
if (evenIfUnstable) {
this.evenIfUnstableParameterized = evenIfUnstable
}

Could you please correct this?

Pull request for jenkins-dsl-plugin to trigger newly created jobs

The jenkins-dsl-plugin lacks the ability to queue newly created jobs for build. While the DSL provides the queue(job) and queue(jobName) methods, there is no way to easily discern/filter jobs that are newly created vs jobs that already exist.

This is a problem for jobs that have expensive build steps to run (e.g., kitchen test), or jobs that are not idempotent (e.g., version bumping). The chef CD pipeline has both expensive steps and non-idempotent steps in the early stage(s).

Looking at the source for job-dsl-plugin ExecuteDslScripts method lines 162-164 and lines 247-249, it seems this should be possible to implement using a couple new UI checkbox options (i.e., java Stapler templates) for build actions when adding or modifying jobs.

Believe we could fork the job-dsl-plugin repo and submit a PR for the javaposse.jobdsl.plugin.ExecuteDslScripts classthat does something along the lines of:

// Line 162
updateGeneratedJobs(build, listener, freshJobs);
// add the ability to trigger a build for newly created jobs
queueCreatedJobs(jm, build, listener, freshJobs);
...
// new method to implement
private void queueCreatedJobs(JenkinsJobManagement jm, final AbstractBuild<?, ?> build, BuildListener listener, Set<GeneratedJob> freshJobs) throws IOException {
        Set<GeneratedJob> generatedJobs = extractGeneratedJobs(build.getProject());
        Set<GeneratedJob> added = Sets.difference(freshJobs, generatedJobs);

        for (GeneratedJob addedJob : added) {
                if (createdJobAction == CreateJobAction.BUILD) {
                    try {
                        jm.queueJob(addedJob);
                    } catch /* ... */ {}
        }

Alpha Release and Cloudbees Folder Plugin

Hi @steve-jansen,

I installed today your alpha release from here in order to use the promotion feature with Jenkins DSL and I found a bug when the generated job is saved in a folder (created using Cloudbees Folders Plugin).

It is a path issue from my checks because the promotion folder is saved in the folder root and not in the job root. I can add more details if you are interesed to fix this issue.

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.