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.
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
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:
The repository includes a second deployment pipeline for AWS App Runner.
You can follow through the documentation for a complete walkthrough.
To run the microservice:
bundle install
bundle exec rackup
To run tests:
bundle exec rspec
To build and run Docker container:
docker build -t semaphore-demo-ruby-app .
docker run -itd -p 8080:8080 semaphore-demo-ruby-app
curl localhost:8080
> hello world :))
Copyright (c) 2021 Rendered Text
Distributed under the MIT License. See the file LICENSE.