Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscribe to Workstation App pr merges #255

Merged
merged 1 commit into from
Oct 10, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .expeditor/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,6 @@ subscriptions:
- workload: artifact_published:stable:chefdk:3*
actions:
- bash:.expeditor/update_chefdk_to_stable.sh
- workload: pull_request_merged:chef/chef-workstation-app:master:*
actions:
- bash:.expeditor/update_chef-workstation-app_to_latest.sh
32 changes: 32 additions & 0 deletions .expeditor/update_chef-workstation-app_to_latest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

############################################################################
# What is this script?
#
# Chef Workstation uses Expeditor to manage the bundled version of the
# Chef Workstation App. Currently we always want to include the latest version
# of Chef Workstation App inside Workstation, so this script takes that version
# and uses sed to insert it into the omnibus project definition. Then it commits
# that change and opens a pull request for review and merge.
############################################################################

set -evx

version=$(get_github_file $REPO master VERSION)

branch="expeditor/chef_workstation_app_${version}"
git checkout -b "$branch"

sed -i -r "s/override :\"chef-workstation-app\",\s+version: \"v[^\"]+\"/override :\"chef-workstation-app\", version: \"v${version}\"/" omnibus/config/projects/chef-workstation.rb

git add .

# give a friendly message for the commit and make sure it's noted for any future audit of our codebase that no
# DCO sign-off is needed for this sort of PR since it contains no intellectual property
git commit --message "Bump Chef Workstation App to $version" --message "This pull request was triggered automatically via Expeditor when Chef Workstation App $version was merged." --message "This change falls under the obvious fix policy so no Developer Certificate of Origin (DCO) sign-off is required."

open_pull_request

# Get back to master and cleanup the leftovers - any changed files left over at the end of this script will get committed to master.
git checkout -
git branch -D "$branch"
6 changes: 6 additions & 0 deletions omnibus/config/projects/chef-workstation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@

override :"chef-dk", version: "v3.3.23"

# The Chef Workstation App version is pinned by Expeditor. Whenever Chef Workstation
# App is merged then Expeditor takes the latest tag, runs a script to replace it here
# and pushes a new commit / build through.

override :"chef-workstation-app", version: "v0.0.25"

# DK's overrides; god have mercy on my soul
# This comes from DK's ./omnibus_overrides.rb
# If this stays, may need to duplicate that file and the rake
Expand Down