Sha256: 60947db6bdcce0ba647aeac7477cce9ba01c60031bef405fe397af04d889ffd6

Contents?: true

Size: 776 Bytes

Versions: 2

Compression:

Stored size: 776 Bytes

Contents

---
title: Ruby
nav_text: Ruby
categories: example
nav_order: 18
---

This examples show to run Ruby unit tests.

Here's the project DSL.

.codebuild/project.rb:


```ruby
github_url("https://github.com/username/repo")
linux_image("aws/codebuild/ruby:2.5.3-1.7.0")
environment_variables(
  JETS_ENV: Codebuild.env,
)
```

Here's the buildspec:

.codebuild/buildspec.yml

```yaml
version: 0.2

phases:
  install:
    commands:
      - apt-get update -y apt-get install -y rsync
  build:
    commands:
      - echo Build started on `date`
      - sed -i '/BUNDLED WITH/Q' Gemfile.lock # hack to fix bundler issue: allow different versions of bundler to work
      - bundle
      - JETS_ENV=test bundle exec rspec
```

{% include examples-steps.md %}

{% include prev_next.md %}

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
codebuild-0.6.2 docs/_docs/examples/ruby.md
codebuild-0.6.1 docs/_docs/examples/ruby.md