summaryrefslogtreecommitdiffstats
path: root/job-cfg
diff options
context:
space:
mode:
Diffstat (limited to 'job-cfg')
-rw-r--r--job-cfg/Makefile17
1 files changed, 13 insertions, 4 deletions
diff --git a/job-cfg/Makefile b/job-cfg/Makefile
index a21db825..7100af4f 100644
--- a/job-cfg/Makefile
+++ b/job-cfg/Makefile
@@ -6,15 +6,24 @@ YAMLS := $(wildcard *.yaml) $(PYYAMLS)
XMLS := $(patsubst %.yaml,%.xml,$(YAMLS))
-OUTPUTS := $(PYYAMLS) $(XMLS)
+OUTS := $(patsubst %.yaml,%.jjb-out,$(YAMLS))
+
+OUTPUTS := $(PYYAMLS) $(XMLS) $(OUTS) zombie-names.txt jobs-names.txt
all: $(OUTPUTS)
%.yaml: %.yaml.py
./$< > $@
-%.xml: %.yaml
- jenkins-job-builder test $< > $@
+
+%.xml %.jjb-out: %.yaml
+ jenkins-job-builder test $< > $*.xml 2> $*.jjb-out
+
+jobs-names.txt: $(OUTS)
+ sed -n 's/^INFO:jenkins_jobs.builder:Job name: //p' $(OUTS) > $@
+
+zombie-names.txt: jobs-names.txt ~jenkins/jobs/
+ ls ~jenkins/jobs/ | grep -f jobs-names.txt -F -v > $@
clean:
- rm $(sort $(OUTPUTS))
+ -rm $(OUTPUTS)