blob: c16efc1d354812e9e14fb57402217db731a3e00a [file] [log] [blame]
Jan Tattermusch320bd612015-09-15 12:44:35 -07001#!/bin/bash
Jan Tattermusch7897ae92017-06-07 22:57:36 +02002# Copyright 2015 gRPC authors.
Jan Tattermusch320bd612015-09-15 12:44:35 -07003#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02004# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
Jan Tattermusch320bd612015-09-15 12:44:35 -07007#
Jan Tattermusch7897ae92017-06-07 22:57:36 +02008# http://www.apache.org/licenses/LICENSE-2.0
Jan Tattermusch320bd612015-09-15 12:44:35 -07009#
Jan Tattermusch7897ae92017-06-07 22:57:36 +020010# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Jan Tattermusch320bd612015-09-15 12:44:35 -070015#
Jan Tattermusch91ad0182015-10-01 09:22:03 -070016# Builds Node interop server and client in a base image.
Jan Tattermusch320bd612015-09-15 12:44:35 -070017set -e
18
Jan Tattermusch91ad0182015-10-01 09:22:03 -070019mkdir -p /var/local/git
murgatroid99fbc182e2017-10-17 11:42:12 -070020git clone /var/local/jenkins/grpc-node /var/local/git/grpc-node
Matt Kwong5d0f2462016-09-26 12:05:05 -070021# clone gRPC submodules, use data from locally cloned submodules where possible
murgatroid99fbc182e2017-10-17 11:42:12 -070022(cd /var/local/jenkins/grpc-node/ && git submodule foreach 'cd /var/local/git/grpc-node \
23&& git submodule update --init --recursive --reference /var/local/jenkins/grpc-node/${name} \
Matt Kwong5d0f2462016-09-26 12:05:05 -070024${name}')
Jan Tattermusch320bd612015-09-15 12:44:35 -070025
Jan Tattermusch2b778d62015-10-06 09:03:36 -070026# copy service account keys if available
27cp -r /var/local/jenkins/service_account $HOME || true
28
murgatroid99fbc182e2017-10-17 11:42:12 -070029cd /var/local/git/grpc-node
Jan Tattermusch91ad0182015-10-01 09:22:03 -070030
Jan Tattermusch91ad0182015-10-01 09:22:03 -070031# build Node interop client & server
murgatroid99fbc182e2017-10-17 11:42:12 -070032npm install -g node-gyp gulp
33npm install
34gulp setup