From 0d2439f018f87a07bfea9bf06459bae9137ace8b Mon Sep 17 00:00:00 2001 From: Julie Qiu Date: Fri, 4 Jun 2021 12:22:04 -0400 Subject: [PATCH] devtools/ci: add files for CI Files used for kokoro are copied to devtools/ci along with a README.md, so that it is clear what these files are used for. The existing files will be deleted in the next CL, after an internal CL is merged to change references. Change-Id: I893ac9461d3f775460ba749da80e2b4ba71dcc1e Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/325129 Trust: Julie Qiu Reviewed-by: Jonathan Amsterdam --- all.bash | 6 +++--- devtools/ci/README.md | 8 ++++++++ devtools/ci/ci.sh | 47 +++++++++++++++++++++++++++++++++++++++++++ devtools/ci/e2e.sh | 16 +++++++++++++++ devtools/ci/nodejs.h | 20 ++++++++++++++++++ 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 devtools/ci/README.md create mode 100755 devtools/ci/ci.sh create mode 100755 devtools/ci/e2e.sh create mode 100755 devtools/ci/nodejs.h diff --git a/all.bash b/all.bash index 8954e311..b88a17ac 100755 --- a/all.bash +++ b/all.bash @@ -180,7 +180,7 @@ run_build_static() { } run_npm() { - npmcmd="./devtools/docker_nodejs.sh npm" + npmcmd="./devtools/ci/docker_nodejs.sh npm" if [[ -x "$(command -v npm)" ]]; then npmcmd="npm" fi @@ -192,7 +192,7 @@ run_npm() { } run_npx() { - npxcmd="./devtools/docker_nodejs.sh npx" + npxcmd="./devtools/ci/docker_nodejs.sh npx" if [[ -x "$(command -v npx)" ]]; then npxcmd="npx" fi @@ -216,7 +216,7 @@ run_prettier() { if [[ -x "$(command -v npx)" ]]; then runcmd npx prettier --write $files else - runcmd ./devtools/docker_nodejs.sh npx prettier --write $files + runcmd ./devtools/ci/docker_nodejs.sh npx prettier --write $files fi } diff --git a/devtools/ci/README.md b/devtools/ci/README.md new file mode 100644 index 00000000..e156b364 --- /dev/null +++ b/devtools/ci/README.md @@ -0,0 +1,8 @@ +# CI + +The Go pkgsite project uses a continuous integration service called “Kokoro” +for running tests. + +This directory contains files used for kokoro test job configurations. +(Additional job definitions live in an internal repository). The shell scripts +that act as entry points to execute the actual tests. diff --git a/devtools/ci/ci.sh b/devtools/ci/ci.sh new file mode 100755 index 00000000..96747d28 --- /dev/null +++ b/devtools/ci/ci.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash +# 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. + +set -e + +usage() { + cat <