【文件属性】:
文件名称:semaphore-demo-ruby-kubernetes:用于Kubernetes的Semaphore演示CICD管道
文件大小:329KB
文件格式:ZIP
更新时间:2021-01-30 10:12:37
ruby docker kubernetes sinatra continuous-integration
Kubernetes的Semaphore CI / CD演示
这是一个示例应用程序和CI / CD管道,展示了如何使用Semaphore 2.0将微服务构建,测试和部署到Kubernetes。
配料:
Ruby Sinatra作为Web框架
RSpec测试
打包在Docker容器中
容器被推送到Docker Hub注册表
部署到Kubernetes
信号量上的CI / CD
如果您不熟悉Semaphore,请随意此存储库并使用它来。
CI / CD管道在.semaphore目录中定义,如下所示:
本地应用程序设置
要运行微服务:
bundle install --path vendor/bundle
bundle exec rackup
要运行测试:
bundle exec rspec
要构建和运行Docker容器:
docker build -t semaphore-demo-ruby-kubernetes .
docker run -p 80:4567 semaphore-demo-ruby-kubernetes
curl localhost
> hello worl
【文件预览】:
semaphore-demo-ruby-kubernetes-master
----.gitignore(28B)
----Dockerfile(303B)
----pipeline.png(399KB)
----config.ru(132B)
----.semaphore()
--------semaphore.yml(3KB)
--------deploy-k8s.yml(2KB)
--------docker-build.yml(2KB)
----.rspec(23B)
----deployment.yml(681B)
----LICENSE(1KB)
----spec()
--------app_spec.rb(336B)
--------spec_helper.rb(232B)
----app.rb(154B)
----README.md(1KB)
----Dockerfile.ci(374B)
----Gemfile(108B)
----Gemfile.lock(809B)