Skip to content

Commit

Permalink
Support to publish gem via expeditor
Browse files Browse the repository at this point in the history
Signed-off-by: sachin007jain <[email protected]>
  • Loading branch information
sachin007jain committed Jun 12, 2022
1 parent ad0b5f7 commit 776af38
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 6 deletions.
56 changes: 56 additions & 0 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Documentation available at https://expeditor.chef.io/docs/getting-started/
---

# Slack channel in Chef Software slack to send notifications about build failures, etc
slack:
notify_channel: chef-ws-notify

# This publish is triggered by the `built_in:publish_rubygems` artifact_action.
rubygems:
- berkshelf

github:
# This deletes the GitHub PR branch after successfully merged into the release branch
delete_branch_on_merge: true
# The tag format to use (e.g. v1.0.0)
version_tag_format: "v{{version}}"
# allow bumping the minor release via label
minor_bump_labels:
- "Expeditor: Bump Version Minor"
# allow bumping the major release via label
major_bump_labels:
- "Expeditor: Bump Version Major"

release_branches:
- main:
version_constraint: 8*

changelog:
rollup_header: Changes not yet released to rubygems.org

subscriptions:
# These actions are taken, in order they are specified, anytime a Pull Request is merged.
- workload: pull_request_merged:{{github_repo}}:{{release_branch}}:*
actions:
- built_in:bump_version:
ignore_labels:
- "Expeditor: Skip Version Bump"
- "Expeditor: Skip All"
- bash:.expeditor/update_version.sh:
only_if: built_in:bump_version
- built_in:update_changelog:
ignore_labels:
- "Expeditor: Skip Changelog"
- "Expeditor: Skip All"
- built_in:build_gem:
only_if: built_in:bump_version
- workload: project_promoted:{{agent_id}}:*
actions:
- built_in:rollover_changelog
- built_in:publish_rubygems

pipelines:
- verify:
description: Pull Request validation tests
public: true

16 changes: 16 additions & 0 deletions .expeditor/run_linux_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
#
# setups up the bundler to caching, then run the script

set -ue

export USER="root"
export LANG=C.UTF-8 LANGUAGE=C.UTF-8

echo "--- bundle install"

bundle config --local path vendor/bundle
bundle install --jobs=7 --retry=3

echo "+++ bundle exec task"
bundle exec $@
12 changes: 12 additions & 0 deletions .expeditor/update_version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
#
# After a PR merge, Chef Expeditor will bump the PATCH version in the VERSION file.
# It then executes this file to update any other files/components with that new version.
#

set -evx

sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" lib/berkshelf/version.rb

# Once Expeditor finishes executing this script, it will commit the changes and push
# the commit as a new tag corresponding to the value in the VERSION file.
10 changes: 10 additions & 0 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
expeditor:
cached_folders:
- vendor
defaults:
buildkite:
retry:
automatic:
limit: 1
timeout_in_minutes: 30
15 changes: 9 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Change Log
<!-- latest_release -->
<!-- latest_release -->

<!-- release_rollup -->
<!-- release_rollup -->

<!-- latest_stable_release -->
## [8.0.2](https://github.com/chef/berkshelf/releases/tag/v8.0.2) (2022-06-02)
- Fix directory structure of berkshelf package
<!-- latest_stable_release -->

## [8.0.1](https://github.com/chef/berkshelf/releases/tag/v8.0.1) (2022-05-19)
- Updated the gem specifications to point to the forked repo.
Expand Down Expand Up @@ -1666,8 +1673,4 @@
- Executable [\#4](https://github.com/berkshelf/berkshelf/pull/4) ([capoferro](https://github.com/capoferro))
- Rdoc readme [\#3](https://github.com/berkshelf/berkshelf/pull/3) ([erikh](https://github.com/erikh))
- Rake checks [\#2](https://github.com/berkshelf/berkshelf/pull/2) ([erikh](https://github.com/erikh))
- gemfile and building gem properly. Version is in lib/remy/version.rb [\#1](https://github.com/berkshelf/berkshelf/pull/1) ([erikh](https://github.com/erikh))



\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
- gemfile and building gem properly. Version is in lib/remy/version.rb [\#1](https://github.com/berkshelf/berkshelf/pull/1) ([erikh](https://github.com/erikh))
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8.0.2

0 comments on commit 776af38

Please sign in to comment.