From ebf882070e710f66f0c622eb4fb4ae37d87c7926 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 26 Oct 2016 15:41:30 -0700 Subject: [PATCH 1/2] Decrease Node module cache time to avoid errors with out-of-date modules --- tools/run_tests/build_artifact_node.bat | 1 + tools/run_tests/build_artifact_node.sh | 1 + tools/run_tests/pre_build_node.bat | 5 ++--- tools/run_tests/pre_build_node.sh | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/run_tests/build_artifact_node.bat b/tools/run_tests/build_artifact_node.bat index 2e0ecd21d0f..890fb31a658 100644 --- a/tools/run_tests/build_artifact_node.bat +++ b/tools/run_tests/build_artifact_node.bat @@ -33,6 +33,7 @@ set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm del /f /q BUILD || rmdir build /s /q +call npm cache clean || goto :error call npm update || goto :error mkdir artifacts diff --git a/tools/run_tests/build_artifact_node.sh b/tools/run_tests/build_artifact_node.sh index 778a5c95d4a..326cf296133 100755 --- a/tools/run_tests/build_artifact_node.sh +++ b/tools/run_tests/build_artifact_node.sh @@ -40,6 +40,7 @@ rm -rf build || true mkdir -p artifacts +npm cache clean npm update node_versions=( 0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 6.0.0 7.0.0 ) diff --git a/tools/run_tests/pre_build_node.bat b/tools/run_tests/pre_build_node.bat index a29456f9ed9..addb01a2a4d 100644 --- a/tools/run_tests/pre_build_node.bat +++ b/tools/run_tests/pre_build_node.bat @@ -29,6 +29,5 @@ set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm -@rem Expire cache after 1 week -call npm update --cache-min 604800 - +@rem Expire cache after 1 day +call npm update --cache-min 86400 diff --git a/tools/run_tests/pre_build_node.sh b/tools/run_tests/pre_build_node.sh index 4879e7ad9bd..e63be9da523 100755 --- a/tools/run_tests/pre_build_node.sh +++ b/tools/run_tests/pre_build_node.sh @@ -37,8 +37,8 @@ set -ex export GRPC_CONFIG=${CONFIG:-opt} -# Expire cache after 1 week -npm update --cache-min 604800 +# Expire cache after 1 day +npm update --cache-min 86400 npm install node-gyp-install ./node_modules/.bin/node-gyp-install From 06fbca03d0dba821b49f7e05860a0b43cd90d19a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 26 Oct 2016 16:01:24 -0700 Subject: [PATCH 2/2] Don't try to build Node 7 artifacts yet --- tools/run_tests/build_artifact_node.bat | 2 +- tools/run_tests/build_artifact_node.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/build_artifact_node.bat b/tools/run_tests/build_artifact_node.bat index 890fb31a658..2a1fe5fd92c 100644 --- a/tools/run_tests/build_artifact_node.bat +++ b/tools/run_tests/build_artifact_node.bat @@ -27,7 +27,7 @@ @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -set node_versions=0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 6.0.0 7.0.0 +set node_versions=0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 6.0.0 set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm diff --git a/tools/run_tests/build_artifact_node.sh b/tools/run_tests/build_artifact_node.sh index 326cf296133..997085ccc93 100755 --- a/tools/run_tests/build_artifact_node.sh +++ b/tools/run_tests/build_artifact_node.sh @@ -43,7 +43,7 @@ mkdir -p artifacts npm cache clean npm update -node_versions=( 0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 6.0.0 7.0.0 ) +node_versions=( 0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 6.0.0 ) for version in ${node_versions[@]} do