Coder Social home page Coder Social logo

tsub / circleci-ruby-orbs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sue445/circleci-ruby-orbs

0.0 2.0 0.0 121 KB

CircleCI orb for ruby

Home Page: https://circleci.com/orbs/registry/orb/sue445/ruby-orbs

License: MIT License

Ruby 55.29% Shell 44.71%

circleci-ruby-orbs's Introduction

circleci-ruby-orbs

CircleCI orb for ruby

https://circleci.com/orbs/registry/orb/sue445/ruby-orbs

CircleCI Orb Version CircleCI

Requirements

Usage

Common setting

# .circleci/config.yml
version: 2.1

orbs:
  # Use specific version
  # see. https://github.com/sue445/circleci-ruby-orbs/releases
  ruby-orbs: sue445/[email protected]

  # or
  # Use latest version
  # ruby-orbs: sue445/ruby-orbs@volatile

bundle-install

Run bundle install using cache.

for app repo (Gemfile.lock is committed)

# .circleci/config.yml
jobs:
  rspec:
    docker:
      - image: circleci/ruby

    steps:
      - checkout

      - ruby-orbs/bundle-install
      # or
      - ruby-orbs/bundle-install:
          cache_key_prefix: "v1-bundle"
          bundle_jobs: 4
          bundle_retry: 3
          bundle_path: "vendor/bundle"
          bundle_gemfile: "Gemfile"
          bundle_clean: true
          bundle_extra_args: ""
          restore_bundled_with: true

      # Add your job (e.g. rspec, rubocop)
      - run: bundle exec rspec

for gem repo (Gemfile.lock is not committed)

# .circleci/config.yml
jobs:
  rspec:
    docker:
      - image: circleci/ruby

    steps:
      - checkout

      - ruby-orbs/bundle-install:
          with_gemfile_lock: false
          gemspec_name: "yourgem"
      # or
      - ruby-orbs/bundle-install:
          with_gemfile_lock: false
          gemspec_name: "yourgem"
          cache_key_prefix: "v1-bundle"
          bundle_jobs: 4
          bundle_retry: 3
          bundle_path: "vendor/bundle"
          bundle_clean: true
          bundle_extra_args: ""
          update_always: false

      # Add your job (e.g. rspec, rubocop)
      - run: bundle exec rspec

Parameters

  • cache_key_prefix : Key prefix of cache (default: v1-bundle)
  • bundle_jobs : Passed to bundle install --jobs (default: 4)
  • bundle_retry : Passed to bundle install --retry (default: 3)
  • bundle_path : Passed to bundle install --path or use bundle config set path (default: vendor/bundle)
  • bundle_gemfile : Passed to bundle install --gemfile (default: Gemfile)
  • bundle_clean : Whether pass --clean to bundle install or use bundle config set --local clean 'true' (default: true)
  • bundle_deployment : Whether path to --deployment or run bundle config set deployment 'true' (default: false)
  • bundle_frozen : Whether path to --frozen or run bundle config set frozen 'true' (default: false)
  • bundle_no_cache : Whether path to --no-cache or run bundle config set no-cache 'true' (default: false)
  • bundle_no_prune : Whether path to --no-prune or run bundle config set no-prune 'true' (default: false)
  • bundle_shebang : Whether path to --shebang or run bundle config set shebang 'true' (default: false)
  • bundle_system : Whether path to --system or run bundle config set system 'true' (default: false)
  • bundle_without : Passed to bundle install --without or bundle config set without
  • bundle_with : Passed to bundle install --with or bundle config set with
  • bundle_extra_args : Arguments to pass to bundle install
  • restore_bundled_with : Whether resolve bundler version difference between Gemfile.lock and pre-installed in CI (default: true)
  • with_gemfile_lock : Whether using Gemfile.lock for cache key (default: true)
  • gemspec_name : gemspec name (required if with_gemfile_lock is false)
  • update_always : Whether run always bundle update when with_gemfile_lock is disabled (default: false)

bundle-update-pr

Run bundle update and send PullRequest.

Uses https://github.com/masutaka/circleci-bundle-update-pr

workflows:
  version: 2
  nightly:
    triggers:
      - schedule:
          cron: "00 10 * * 5"
          filters:
            branches:
              only: master
    jobs:
      - ruby-orbs/bundle-update-pr
      # or
      - ruby-orbs/bundle-update-pr:
          image: "circleci/ruby:2.5.3"
          pre-bundle-update-pr:
            - run:
                name: "Set timezone to Asia/Tokyo"
                command: "sudo cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime"
            - ruby-orbs/bundle-install
          git_user_name: "yourname"
          git_user_email: "[email protected]"
          github_access_token: GITHUB_ACCESS_TOKEN

Parameters

  • image : Image for bundle update (default: circleci/ruby)
  • pre-bundle-update-pr : Run steps before circleci-bundle-update-pr (default: [])
  • post-bundle-update-pr : Run steps after circleci-bundle-update-pr (default: [])
  • version : circleci-bundle-update-pr vesion. default is latest
  • assignees : Assign the PR to them. (e.g. alice,bob,carol)
  • reviewers : Request PR review to them. (e.g. alice,bob,carol)
  • labels : Add labels to the PR (e.g. In Review, Update)
  • duplicate : Make PR even if it has already existed (default: false)
  • git_user_name : Username for commit (default: $GIT_USER_NAME)
  • git_user_email : E-mail for commit (default: $GIT_USER_EMAIL)
  • branch : Space separated branches. (e.g. master develop topic) (default: $CIRCLE_BRANCH)
  • github_access_token : Your GitHub personal access token as an env var on CircleCI (default: GITHUB_ACCESS_TOKEN)
    • Go to your account's settings page and generate a personal access token with "repo" scope
    • Use the CircleCI UI to set the GITHUB_ACCESS_TOKEN environment variable.
  • enterprise_octokit_access_token : Your GitHub Enterprise personal access token as an env var on CircleCI (default. ENTERPRISE_OCTOKIT_ACCESS_TOKEN)
    • Use the CircleCI UI to set the ENTERPRISE_OCTOKIT_ACCESS_TOKEN environment variable.
  • enterprise_octokit_api_endpoint : Your GitHub Enterprise api endpoint (e.g. https://www.example.com/api/v3) (default: $ENTERPRISE_OCTOKIT_API_ENDPOINT)
  • no_output_timeout : Elapsed time the command can run without output. (e.g. 20m, 1.25h, 5s) (default: 10m)

External

circleci-ruby-orbs's People

Contributors

brunohkbx avatar sue445 avatar tsub avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.