Jan Tattermusch | 320bd61 | 2015-09-15 12:44:35 -0700 | [diff] [blame] | 1 | #!/bin/bash |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 2 | # Copyright 2015 gRPC authors. |
Jan Tattermusch | 320bd61 | 2015-09-15 12:44:35 -0700 | [diff] [blame] | 3 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 4 | # 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 Tattermusch | 320bd61 | 2015-09-15 12:44:35 -0700 | [diff] [blame] | 7 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
Jan Tattermusch | 320bd61 | 2015-09-15 12:44:35 -0700 | [diff] [blame] | 9 | # |
Jan Tattermusch | 7897ae9 | 2017-06-07 22:57:36 +0200 | [diff] [blame] | 10 | # 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 Tattermusch | 320bd61 | 2015-09-15 12:44:35 -0700 | [diff] [blame] | 15 | # |
Jan Tattermusch | 91ad018 | 2015-10-01 09:22:03 -0700 | [diff] [blame] | 16 | # Builds Node interop server and client in a base image. |
Jan Tattermusch | 320bd61 | 2015-09-15 12:44:35 -0700 | [diff] [blame] | 17 | set -e |
| 18 | |
Jan Tattermusch | 91ad018 | 2015-10-01 09:22:03 -0700 | [diff] [blame] | 19 | mkdir -p /var/local/git |
murgatroid99 | fbc182e | 2017-10-17 11:42:12 -0700 | [diff] [blame] | 20 | git clone /var/local/jenkins/grpc-node /var/local/git/grpc-node |
Matt Kwong | 5d0f246 | 2016-09-26 12:05:05 -0700 | [diff] [blame] | 21 | # clone gRPC submodules, use data from locally cloned submodules where possible |
murgatroid99 | fbc182e | 2017-10-17 11:42:12 -0700 | [diff] [blame] | 22 | (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 Kwong | 5d0f246 | 2016-09-26 12:05:05 -0700 | [diff] [blame] | 24 | ${name}') |
Jan Tattermusch | 320bd61 | 2015-09-15 12:44:35 -0700 | [diff] [blame] | 25 | |
Jan Tattermusch | 2b778d6 | 2015-10-06 09:03:36 -0700 | [diff] [blame] | 26 | # copy service account keys if available |
| 27 | cp -r /var/local/jenkins/service_account $HOME || true |
| 28 | |
murgatroid99 | fbc182e | 2017-10-17 11:42:12 -0700 | [diff] [blame] | 29 | cd /var/local/git/grpc-node |
Jan Tattermusch | 91ad018 | 2015-10-01 09:22:03 -0700 | [diff] [blame] | 30 | |
Jan Tattermusch | 91ad018 | 2015-10-01 09:22:03 -0700 | [diff] [blame] | 31 | # build Node interop client & server |
murgatroid99 | fbc182e | 2017-10-17 11:42:12 -0700 | [diff] [blame] | 32 | npm install -g node-gyp gulp |
| 33 | npm install |
| 34 | gulp setup |