blob: 93a30a5d2d3e25fb04b4fad7f8a1c513b839744f [file] [log] [blame]
# Makefile for testing JJB jobs in a virtualenv
.PHONY: test clean
VENV_DIR ?= venv-jjb
JJB_VERSION ?= 3.2.0
JOBCONFIG_DIR ?= job-configs
$(VENV_DIR):
@echo "Setting up virtualenv for JJB testing"
python3 -m venv $@
$@/bin/pip install jenkins-job-builder==$(JJB_VERSION) pipdeptree
$(JOBCONFIG_DIR):
mkdir $@
test: $(VENV_DIR) $(JOBCONFIG_DIR)
source $(VENV_DIR)/bin/activate ; \
pipdeptree ; \
jenkins-jobs -l DEBUG test --recursive -o $(JOBCONFIG_DIR) jjb/ ;
clean:
rm -rf $(VENV_DIR) $(JOBCONFIG_DIR)