This repository contains the source for the Ruby runtime for Google App Engine Flexible.
For more information on using the Ruby runtime, see https://cloud.google.com/appengine/docs/flexible/ruby/
This repository includes:
This repository also contains a helper image, "app-engine-exec-wrapper" that
provides a way to execute scripts in an App Engine application's environment.
app-engine-exec-wrapper directory for more details.
integration_test directory contains sample applications that are used
by the Google Ruby team for runtime integration tests.
The provided Rakefile builds all the images locally and runs the unit tests in the test directory. It requires Ruby 2.3 and Docker 17.06 or later.
To perform a local build and test:
bundle install bundle exec rake
Note this procedure tests against production prebuilt Ruby binaries by default. To create and test locally-built binaries:
USE_LOCAL_PREBUILT=true bundle exec rake
Release candidates can be built using the
build-*.sh scripts. Generally, they
build artifacts, tagged with a build number, to a specified project (defaulting
to the current gcloud project). Builds can be released using the
scripts, which generally just retag a specified build as latest. Each of these
scripts accepts a
-h flag which documents the options.
To build and release runtime images, use the
When building, you may want to set the
-s flag to tag the build as staging,
-i flag to use a prebuilt binary for the convenience base image.
Official release builds of the runtime images are generally performed internally at Google. Such builds are roughly equivalent to:
./build-ruby-runtime-images.sh -i -p gcp-runtimes -s ./release-ruby-runtime-images.sh -p gcp-runtimes
To build and release prebuilt binary images, use the
When building, you should either set the
-c flag or provide a
prebuilt-versions.txt file to tell the runtime which Rubies to build. You may
also want to set the
-s flag to mark the new images as staging.
Official release builds of the prebuilt binaries are generally performed internally at Google. Such builds are roughly equivalent to:
./build-ruby-binary-images.sh -p gcp-runtimes -s -c <versions> ./release-ruby-binary-images.sh -p gcp-runtimes -c <versions>
The canonical list of prebuilt binaries is defined in the file
ruby-pipeline/ruby-latest.yaml, which is the template used to build the
official Ruby runtime. (This file also defines the default Ruby version used if
an app does not specify a Ruby version.) To add to the canonical list, first
build and release the prebuilt binary, then add an applicable entry to
ruby-pipeline/ruby-latest.yaml and perform a template build (which must be
done internally at Google.)
To build and release the runtime pipeline config, use the
-b flag is required. You may also want to set the
-s flag to tag the
pipeline build as staging. Finally, you should either set the
-c flag, or
prebuilt-versions.txt file to tell the runtime which Rubies are
Official release builds of the pipeline are generally performed internally at at Google. Such builds are roughly equivalent to:
./build-ruby-runtime-pipeline.sh -b gcp-runtimes -p gcp-runtimes -s ./release-ruby-runtime-pipeline.sh -b gcp-runtimes -p gcp-runtimes
To build and release the exec wrapper, use the
scripts. You may also want to set the
-s flag to tag the build as staging.
Official release builds of the wrapper are generally performed internally at at Google. Such builds are roughly equivalent to:
./build-app-engine-exec-wrapper.sh -p google-appengine -s ./release-app-engine-exec-wrapper.sh -p google-appengine