Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use up-to-date kokoro build scripts #779

Merged
merged 4 commits into from
Apr 12, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
add rake tasks
  • Loading branch information
TheRoyalTnetennba committed Apr 10, 2019
commit b382191887e0a1727dd099c2366870b87b66fa49
5 changes: 0 additions & 5 deletions .kokoro/build.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
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"

Expand Down
31 changes: 31 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
require "bundler/gem_tasks"

task default: :spec

namespace :kokoro do
task :load_env_vars do
service_account = "#{ENV['KOKORO_GFILE_DIR']}/service-account.json"
ENV["GOOGLE_APPLICATION_CREDENTIALS"] = service_account
filename = "#{ENV['KOKORO_GFILE_DIR']}/env_vars.json"
env_vars = JSON.parse File.read(filename)
env_vars.each { |k, v| ENV[k] = v }
end

task :presubmit do
Rake::Task["spec"].invoke
end

task :continuous do
Rake::Task["spec"].invoke
end

task :nightly do
Rake::Task["spec"].invoke
end
end

def header str, token = "#"
line_length = str.length + 8
puts ""
puts token * line_length
puts "#{token * 3} #{str} #{token * 3}"
puts token * line_length
puts ""
end