blob: 2d8c2ba73a275913b714d1eb482de319e31256b7 [file] [log] [blame]
Zack Williamsc2140b92018-04-05 09:19:22 -07001# Makefile for testing JJB jobs in a virtualenv
2
3.PHONY: test clean
4
5VENV_DIR ?= venv-jjb
Zack Williamsadeb1d42018-04-10 11:56:48 -07006JJB_VERSION ?= 2.0.3
Zack Williamsc2140b92018-04-05 09:19:22 -07007JOBCONFIG_DIR ?= job-configs
8
9$(VENV_DIR):
10 @echo "Setting up virtualenv for JJB testing"
11 virtualenv $@
12 $@/bin/pip install jenkins-job-builder==$(JJB_VERSION) pipdeptree
13
14$(JOBCONFIG_DIR):
15 mkdir $@
16
17test: $(VENV_DIR) $(JOBCONFIG_DIR)
18 source $(VENV_DIR)/bin/activate ; \
19 pipdeptree ; \
20 jenkins-jobs -l DEBUG test --recursive -o $(JOBCONFIG_DIR) jjb/ ;
21
22clean:
23 rm -rf $(VENV_DIR) $(JOBCONFIG_DIR)