All Downloads are FREE. Search and download functionalities are using the official Maven repository.

uk.co.codera.ci.tooling.application.JenkinsConfiguration Maven / Gradle / Ivy

Go to download

Reponsible for wiring together the DropWizard configuration and application. Builds the runnable jar.

There is a newer version: 0.2.4
Show newest version
package uk.co.codera.ci.tooling.application;

import org.hibernate.validator.constraints.NotEmpty;

import com.fasterxml.jackson.annotation.JsonProperty;

public class JenkinsConfiguration {

    @JsonProperty
    @NotEmpty
    private String jenkinsServerUrl;

    @NotEmpty
    @JsonProperty
    private String jenkinsJobTemplateFile;

    public JenkinsConfiguration() {
        super();
    }

    private JenkinsConfiguration(Builder builder) {
        this();
        this.jenkinsServerUrl = builder.serverUrl;
        this.jenkinsJobTemplateFile = builder.jobTemplateFile;
    }

    public static Builder someJenkinsConfiguration() {
        return new Builder();
    }

    public String getJenkinsServerUrl() {
        return this.jenkinsServerUrl;
    }

    public String getJenkinsJobTemplateFile() {
        return this.jenkinsJobTemplateFile;
    }

    public static class Builder {

        private String serverUrl;
        private String jobTemplateFile;

        private Builder() {
            super();
        }

        public Builder serverUrl(String serverUrl) {
            this.serverUrl = serverUrl;
            return this;
        }

        public Builder jobTemplateFile(String jobTemplateFile) {
            this.jobTemplateFile = jobTemplateFile;
            return this;
        }

        public JenkinsConfiguration build() {
            return new JenkinsConfiguration(this);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy