summaryrefslogtreecommitdiffstats
path: root/job-cfg/Makefile
blob: 7100af4f2c3739dcbee47aed835a59f09d5d1a59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
PYYAMLS := $(basename $(wildcard *.yaml.py))

YAMLS := $(wildcard *.yaml) $(PYYAMLS)

XMLS := $(patsubst %.yaml,%.xml,$(YAMLS))

OUTS := $(patsubst %.yaml,%.jjb-out,$(YAMLS))

OUTPUTS := $(PYYAMLS) $(XMLS) $(OUTS) zombie-names.txt jobs-names.txt

all:  $(OUTPUTS)

%.yaml: %.yaml.py
	./$< > $@


%.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 $(OUTPUTS)