Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

build(kokoro): setup samples and system test #161

Merged
merged 4 commits into from
Aug 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

# Use the trampoline script to run in docker.
build_file: "nodejs-vision/.kokoro/trampoline.sh"

Expand Down
3 changes: 0 additions & 3 deletions .kokoro/continuous/node10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

# Use the trampoline script to run in docker.
build_file: "nodejs-vision/.kokoro/trampoline.sh"

Expand Down
3 changes: 0 additions & 3 deletions .kokoro/continuous/node6/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

# Use the trampoline script to run in docker.
build_file: "nodejs-vision/.kokoro/trampoline.sh"

Expand Down
3 changes: 0 additions & 3 deletions .kokoro/continuous/node8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

# Use the trampoline script to run in docker.
build_file: "nodejs-vision/.kokoro/trampoline.sh"

Expand Down
7 changes: 7 additions & 0 deletions .kokoro/continuous/node8/samples-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vision/.kokoro/samples-test.sh"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/node8/system-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-vision/.kokoro/system-test.sh"
}
3 changes: 0 additions & 3 deletions .kokoro/presubmit/node10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

# Use the trampoline script to run in docker.
build_file: "nodejs-vision/.kokoro/trampoline.sh"

Expand Down
3 changes: 0 additions & 3 deletions .kokoro/presubmit/node6/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

# Use the trampoline script to run in docker.
build_file: "nodejs-vision/.kokoro/trampoline.sh"

Expand Down
3 changes: 0 additions & 3 deletions .kokoro/presubmit/node8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ action {
# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

# Use the trampoline script to run in docker.
build_file: "nodejs-vision/.kokoro/trampoline.sh"

Expand Down
32 changes: 32 additions & 0 deletions .kokoro/samples-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail

# Setup service account credentials.
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json

cd github/nodejs-vision

npm install

# Install and link samples
cd samples/
npm link ../
npm install
cd ..

npm run samples-test
26 changes: 26 additions & 0 deletions .kokoro/system-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail

# Setup service account credentials.
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json

cd github/nodejs-vision

npm install

npm run system-test