forked from stratum/stratum-ci
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (20 loc) · 683 Bytes
/
Makefile
File metadata and controls
27 lines (20 loc) · 683 Bytes
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
# SPDX-FileCopyrightText: 2020 Open Networking Foundation <info@opennetworking.org>
#
# SPDX-License-Identifier: LicenseRef-ONF-Member-Only-1.0
# Makefile for testing JJB jobs in a venv
.PHONY: test clean
SHELL := /usr/bin/env bash
VENV_DIR ?= venv-jjb
JJB_VERSION ?= 3.10.0
JOBCONFIG_DIR ?= job-configs
$(VENV_DIR):
@echo "Setting up venv for JJB testing"
python3 -m venv $@
source $@/bin/activate; pip3 install jenkins-job-builder==$(JJB_VERSION)
$(JOBCONFIG_DIR):
mkdir $@
test: $(VENV_DIR) $(JOBCONFIG_DIR)
source $(VENV_DIR)/bin/activate ; \
jenkins-jobs -l DEBUG test --recursive -o $(JOBCONFIG_DIR) jjb/
clean:
rm -rf $(VENV_DIR) $(JOBCONFIG_DIR)