Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.
Open
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
16 changes: 16 additions & 0 deletions .kokoro/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
REM This file runs tests for merges, PRs, and nightlies.
REM There are a few rules for what tests are run:
REM * PRs run all non-acceptance tests for every library.
REM * Merges run all non-acceptance tests for every library, and acceptance tests for all altered libraries.
REM * Nightlies run all acceptance tests for every library.
REM Currently only runs tests on 2.5.1

SET url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/build.bat"

SET "download=powershell -C Invoke-WebRequest -Uri %url% -OutFile master-build.bat"

SET EXIT_STATUS=1

%download% && master-build.bat && SET EXIT_STATUS=0

EXIT %EXIT_STATUS%
4 changes: 4 additions & 0 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

script_url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/build.sh"
curl -o master-build.sh $script_url && source master-build.sh
24 changes: 24 additions & 0 deletions .kokoro/continuous/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# 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-ruby"

env_vars: {
key: "JOB_TYPE"
value: "continuous"
}

env_vars: {
key: "REPO_DIR"
value: "github/getting-started-ruby"
}
25 changes: 25 additions & 0 deletions .kokoro/continuous/linux.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "getting-started-ruby/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
# Dockerfile is maintained at https://github.com/googleapis/google-cloud-ruby/tree/master/.kokoro/docker/multi
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/getting-started-ruby/.kokoro/build.sh"
}

env_vars: {
key: "TRAMPOLINE_SCRIPT"
value: "trampoline_v1.py"
}

env_vars: {
key: "OS"
value: "linux"
}
8 changes: 8 additions & 0 deletions .kokoro/continuous/osx.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "getting-started-ruby/.kokoro/osx.sh"

env_vars: {
key: "OS"
value: "osx"
}
30 changes: 30 additions & 0 deletions .kokoro/continuous/post.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "getting-started-ruby/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
# Dockerfile is maintained at https://github.com/googleapis/google-cloud-ruby/tree/master/.kokoro/docker/multi-node
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi-node"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/getting-started-ruby/.kokoro/build.sh"
}

env_vars: {
key: "TRAMPOLINE_SCRIPT"
value: "trampoline_v1.py"
}

env_vars: {
key: "OS"
value: "linux"
}

env_vars: {
key: "JOB_TYPE"
value: "post"
}
29 changes: 29 additions & 0 deletions .kokoro/continuous/windows.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "getting-started-ruby/.kokoro/trampoline.bat"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/windows"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/getting-started-ruby/.kokoro/build.bat"
}

env_vars: {
key: "TRAMPOLINE_SCRIPT"
value: "trampoline_windows.py"
}

env_vars: {
key: "REPO_DIR"
value: "getting-started-ruby"
}

env_vars: {
key: "OS"
value: "windows"
}
4 changes: 4 additions & 0 deletions .kokoro/osx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

script_url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/osx.sh"
curl -o master-osx.sh $script_url && source master-osx.sh
24 changes: 24 additions & 0 deletions .kokoro/presubmit/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# 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-ruby"

env_vars: {
key: "JOB_TYPE"
value: "presubmit"
}

env_vars: {
key: "REPO_DIR"
value: "github/getting-started-ruby"
}
24 changes: 24 additions & 0 deletions .kokoro/presubmit/linux.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "getting-started-ruby/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/multi"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/getting-started-ruby/.kokoro/build.sh"
}

env_vars: {
key: "TRAMPOLINE_SCRIPT"
value: "trampoline_v1.py"
}

env_vars: {
key: "OS"
value: "linux"
}
8 changes: 8 additions & 0 deletions .kokoro/presubmit/osx.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "getting-started-ruby/.kokoro/osx.sh"

env_vars: {
key: "OS"
value: "osx"
}
29 changes: 29 additions & 0 deletions .kokoro/presubmit/windows.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Format: //devtools/kokoro/config/proto/build.proto

build_file: "getting-started-ruby/.kokoro/trampoline.bat"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/windows"
}

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/getting-started-ruby/.kokoro/build.bat"
}

env_vars: {
key: "TRAMPOLINE_SCRIPT"
value: "trampoline_windows.py"
}

env_vars: {
key: "REPO_DIR"
value: "getting-started-ruby"
}

env_vars: {
key: "OS"
value: "windows"
}
10 changes: 10 additions & 0 deletions .kokoro/trampoline.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

SET url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/trampoline.bat"

SET "download=powershell -C Invoke-WebRequest -Uri %url% -OutFile master-trampoline.bat"

SET EXIT_STATUS=1

%download% && master-trampoline.bat && SET EXIT_STATUS=0

EXIT %EXIT_STATUS%
4 changes: 4 additions & 0 deletions .kokoro/trampoline.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

script_url="https://raw.githubusercontent.com/googleapis/google-cloud-ruby/master/.kokoro/trampoline.sh"
curl -o master-trampoline.sh $script_url && source master-trampoline.sh
19 changes: 19 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
inherit_gem:
google-style: google-style.yml

AllCops:
Exclude:
- "**/spec/**/*.rb"
- "Rakefile"

Metrics/BlockLength:
Exclude:
- "**/*test.rb"
Style/Documentation:
Enabled: false
Style/GuardClause:
Enabled: false
Style/MixinUsage:
Exclude:
- "bookshelf/**/*"
- "**/*test.rb"
20 changes: 20 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2020 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
#
# http://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.

source "https://rubygems.org"

group :development, :test do
gem "google-style", "~> 1.24.0"
gem "rake", "~> 13.0"
end
Loading