Skip to content
A Semaphore CI/CD pipeline with Google Cloud Run.
Ruby Dockerfile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.semaphore
spec
.gitignore
.rspec
Dockerfile
Gemfile
Gemfile.lock
LICENSE
README.md
app.rb
config.ru
deployment.yml
pipeline.png

README.md

Semaphore CI/CD demo for Google Cloud Run

This is an example application and CI/CD pipeline showing how to build, test and deploy a serverless microservice to Google Cloud Run using Semaphore 2.0.

Ingredients:

  • Ruby Sinatra as web framework
  • RSpec for tests
  • Packaged in a Docker container
  • Container pushed to Google Container Registry
  • Deployed to Google Cloud Run:
    • One-click deployment to staging
    • Continuous deployment to master on green builds on master branch

CI/CD on Semaphore

If you're new to Semaphore, feel free to fork this repository and use it to create a project.

The CI/CD pipeline is defined in .semaphore directory and looks like this:

CI/CD pipeline on Semaphore

You can follow through the documentation for a complete walkthrough.

Local application setup

To run the microservice:

bundle install --path .bundle
bundle exec rackup

To run tests:

bundle exec rspec

To build and run Docker container:

docker build -t semaphore-demo-ruby-kubernetes .
docker run -p 80:4567 semaphore-demo-ruby-kubernetes
curl localhost
> hello world :))

License

Copyright (c) 2019 Rendered Text

Distributed under the MIT License. See the file LICENSE.

You can’t perform that action at this time.