Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

build_spec_runner

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

build_spec_runner

  • 0.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

BuildSpecRunner

Gem Version Code Climate Gemnasium

BuildSpecRunner is a utility for running AWS CodeBuild build_spec.yml files. It does so by running the project locally in a Docker container, trying to mirror the execution semantics of CodeBuild as much as possible. It is primarily useful as a CLI utility but can also be used as a library.

Currently unsupported features:

  • Build artifact export -- BuildSpecRunner will not export your build artifacts. It essentially ignores the "artifacts" section of the Build Spec file.
  • Build Environment Variables -- BuildSpecRunner does not specify all the same environment variables as AWS CodeBuild. It does support environment variables declared in the Build Spec file.

Installation

Dependencies

BuildSpecRunner requires Docker. See the Docker installation instructions. If you wish to be able to execute docker without root, you may want to follow the Linux Post-Installation Instructions. Please be aware of the security risks of doing so.

BuildSpecRunner tries to attach AWS STS credentials to the Docker container by default. It is recommended that you configure the AWS CLI to enable this functionality. This lets you run any actions in your project that require AWS authentication. You may choose the AWS profile to use, otherwise it falls back to the configured default.

CLI utility installation

$ gem install build_spec_runner

Library installation

Add this line to your application's Gemfile:

gem 'build_spec_runner'

And then execute:

$ bundle

Or install it yourself as:

$ gem install build_spec_runner

Usage

Execute a project located at a directory, given the default buildspec.yml Build Spec filename:

$ build_spec_runner -p /path/to/project/

Specify a different Build Spec filepath with --build_spec_path:

$ build_spec_runner -p /path/to/project/ --build_spec_path ./my_build_spec_so_unique.yml

Relative and absolute paths are OK:

$ build_spec_runner -p ../project/ --build_spec_path /path/to/build/spec/bs.yml

You can silence BuildSpecRunner's debug output with -q or --quiet:

$ build_spec_runner -p /path/to/project/ --quiet

Specify your own Docker image by its ID with --image_id:

$ build_spec_runner -p /path/to/project/ --image_id fee13e06bbce

Specify a different AWS CodeBuild vended image with --aws_dockerfile_path. See the official AWS CodeBuild Docker images repo for more information:

$ build_spec_runner -p /path/to/project/ --aws_dockerfile_path ubuntu/java/openjdk-8

By default BuildSpecRunner will use the configured default AWS profile. Specify a different profile with --profile:

$ build_spec_runner -p /path/to/project/ --profile MyBuilderBot

By default BuildSpecRunner will attach AWS STS credentials for the current default AWS profile to the project's Docker container. You can opt out of this by passing --no_credentials:

$ build_spec_runner -p /path/to/project/ --no_credentials

You may specify the AWS region provided to the project. This will set the appropriate env variables to make it look like the project is running in the specified region. Otherwise it uses the default region configured by the current or provided AWS profile.

$ build_spec_runner -p /path/to/project/ --region us-east-2

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jzuber4/build_spec_runner. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the BuildSpecRunner project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

FAQs

Package last updated on 20 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc