aboutsummaryrefslogtreecommitdiff
path: root/devtools/nodejs.sh
diff options
context:
space:
mode:
authorJulie Qiu <julie@golang.org>2021-06-10 19:14:50 -1000
committerJulie Qiu <julie@golang.org>2021-06-11 20:13:42 +0000
commit46d4a94fd57564068abf8269ed717c74504d9774 (patch)
treeab2ce5236f921b33447bb2b2713abfe9fbae2a21 /devtools/nodejs.sh
parent0c78565f5261f98c1171a0d4e308bcf956afdad4 (diff)
downloadgo-x-pkgsite-46d4a94fd57564068abf8269ed717c74504d9774.tar.xz
devtools: copy ci/nodejs.sh to nodejs.sh
A copy of devtools/ci/nodejs.sh is made to devtools/nodejs.sh, and the latter is now referenced where devtools/ci/nodejs.sh was previously used. This makes it easier to comment out tests when testing configuration changes to kokoro. Also, since the contents of ./devtools/nodejs.sh are used in non-ci parts of the repo, so it makes sense to have that script outside the ci/ folder. In a future CL, rather than having these 3 lines in the kokoro config: devtools/ci/nodejs.sh npm install --quiet devtools/ci/nodejs.sh npm run lint devtools/ci/nodejs.sh npm run test They will be moved to devtools/ci/nodejs.sh, which will use devtools/nodejs.sh. Change-Id: I156324a625666ead31be18ae19e5608d38e0faf1 Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/326989 Trust: Julie Qiu <julie@golang.org> Run-TryBot: Julie Qiu <julie@golang.org> Reviewed-by: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'devtools/nodejs.sh')
-rwxr-xr-xdevtools/nodejs.sh18
1 files changed, 18 insertions, 0 deletions
diff --git a/devtools/nodejs.sh b/devtools/nodejs.sh
new file mode 100755
index 00000000..3b6a5111
--- /dev/null
+++ b/devtools/nodejs.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env -S bash -e
+
+# Copyright 2020 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# Script for running a nodejs docker image.
+# It passes env variables for e2e tests,
+# mounts the pwd into a volume in the container at /pkgsite,
+# and sets the working directory in the container to /pkgsite.
+
+docker run --net=host --rm -t \
+ -e GO_DISCOVERY_E2E_BASE_URL \
+ -e GO_DISCOVERY_E2E_AUTHORIZATION \
+ -e GO_DISCOVERY_E2E_QUOTA_BYPASS \
+ -v `pwd`:/pkgsite \
+ -w /pkgsite \
+ node:14.17.0 $@