Skip to content

Commit

Permalink
Merge pull request #1192 from zregvart/pr/build-ec-with-network
Browse files Browse the repository at this point in the history
  • Loading branch information
zregvart authored Oct 15, 2024
2 parents 50620c0 + a7ed032 commit 68ecb7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ OPA=$(EC) opa
CONFTEST=EC_EXPERIMENTAL=1 $(EC)
TKN=go run github.com/tektoncd/cli/cmd/tkn
TEST_CMD_DEFAULT=$(OPA) test $(TEST_FILES) $(TEST_FILTER)
# if unshare is available we isolate the process to run without network access,
# if it is not we run as is; building ec will require network access to download
# the dependencies, for this we run `ec version` to have it built first
ifeq ($(shell command -v unshare),)
TEST_CMD=$(TEST_CMD_DEFAULT)
else
TEST_CMD=unshare -r -n $(TEST_CMD_DEFAULT)
TEST_CMD=$(EC) version > /dev/null && unshare -r -n $(TEST_CMD_DEFAULT)
endif

LICENSE_IGNORE=-ignore '.git/**'
Expand Down

0 comments on commit 68ecb7c

Please sign in to comment.