Cuber

Cuber

Continuous Delivery

You can use the Cuber CLI on your local machine or you can use Cuber inside any CI/CD pipeline.

For example you can use GitHub Actions and Cuber to build and deploy your application:

name: CD
on:
  push:
    branches: [ master ]
  workflow_dispatch:
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - uses: buildpacks/github-actions/[email protected]
    - uses: azure/[email protected]
    - uses: ruby/setup-ruby@v1
      with:
        ruby-version: 3.0
        bundler: none
    - run: gem install cuber
    - env:
        KUBECONFIG: ${{secrets.KUBECONFIG}}
        DOCKERCONFIG: ${{secrets.DOCKERCONFIG}}
      run: |
        echo "$KUBECONFIG" > kubeconfig.yml
        echo "$DOCKERCONFIG" > ~/.docker/config.json
    - run: cuber deploy

The action is triggered after a push on the repository or it is activated manually. The workflow installs all the Cuber dependencies and Cuber, copies the secrets to a file (so that you can use them in the Cuberfile) and finally runs cuber deploy, which builds an image of your application and applies the new configuration to Kubernetes.