47 lines
1.3 KiB
Java
47 lines
1.3 KiB
Java
package tk.antoine_roux.wiki.model.internal;
|
|
|
|
import com.fasterxml.jackson.annotation.JsonAnySetter;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import tk.antoine_roux.wiki.model.response.JobResponse;
|
|
|
|
import java.util.Collections;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
|
|
public class GitlabCI {
|
|
public String image;
|
|
@JsonProperty("before_script")
|
|
public List<String> beforeScript = Collections.emptyList();
|
|
@JsonProperty("after_script")
|
|
public List<String> afterScript = Collections.emptyList();
|
|
public Map<String, Job> jobs = Collections.emptyMap();
|
|
|
|
@JsonAnySetter
|
|
public void setJobs(String key, Job value) {
|
|
this.jobs.put(key, value);
|
|
}
|
|
|
|
public JobResponse buildJobResponse() {
|
|
return null;
|
|
}
|
|
|
|
public enum RuleEnum {
|
|
IF("if");
|
|
|
|
String content;
|
|
|
|
RuleEnum(String s) {
|
|
this.content = s;
|
|
}
|
|
}
|
|
|
|
private static class Job {
|
|
public String stage;
|
|
public String image;
|
|
public Map<String, String> variables = Collections.emptyMap();
|
|
public List<String> services = Collections.emptyList();
|
|
public Map<RuleEnum, String> rules = Collections.emptyMap();
|
|
public List<String> script = Collections.emptyList();
|
|
}
|
|
}
|