summaryrefslogtreecommitdiff
path: root/.expeditor
diff options
context:
space:
mode:
authorTom Duffield <tom@chef.io>2017-07-20 13:57:28 -0500
committerTom Duffield <tom@chef.io>2017-07-24 10:15:17 -0500
commit43616bb699dccad598c88df55682d2a7821ad7ee (patch)
tree084c41ee85a9036beee53ac9effc96c43ec1df7b /.expeditor
parent89d13b94b7de1d4d16304065425c3349d1222148 (diff)
downloadchef-43616bb699dccad598c88df55682d2a7821ad7ee.tar.gz
Update Expeditor config to use new Merge and Artifact Actionstduffield/use-new-artifact-actions
Chef Expeditor now supports built in merge and artifact actions which allow us to reduce the burden of duplicating common processes across all our repositories. This change introduces several of these built_in functions, replacing functionality that was previously kept in our Rakefile. Signed-off-by: Tom Duffield <tom@chef.io>
Diffstat (limited to '.expeditor')
-rw-r--r--.expeditor/config.yml79
-rwxr-xr-x.expeditor/update_dockerfile.sh8
-rwxr-xr-x[-rw-r--r--].expeditor/update_version.sh25
3 files changed, 82 insertions, 30 deletions
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index 2f23fb2b2e..4273e4c514 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -1,27 +1,88 @@
-# The name of the product key for this product from mixlib-install
-product_key: chef
+# The name of the product keys for this product (from mixlib-install)
+product_key:
+ - chef
+ - angrychef
# Slack channel in Chef Software slack to send notifications about build failures, etc
slack:
notify_channel: chef-notify
-# When a version of ChefDK hits the current channel, build a corresponding Docker image
-# and publish that image to https://hub.docker.com/r/chef/chefdk
-docker:
- enable: true
- build_args:
- CHANNEL: "{{channel}}"
- VERSION: "{{version}}"
+# Which Ruby Gems, built when the Omnibus package is built, to publish to rubygems.org
+# This publish is triggered by the `built_in:publish_rubygems` artifact_action.
+rubygems:
+ - chef
+ - chef-config
github:
+ # The file where the MAJOR.MINOR.PATCH version is kept. The version in this file
+ # is bumped automatically via the `built_in:bump_version` merge_action.
+ version_file: "VERSION"
+ # The file where our CHANGELOG is kept. This file is updated automatically with
+ # details from the Pull Request via the `built_in:update_changelog` merge_action.
+ changelog_file: "CHANGELOG.md"
+ # The tag format to use (e.g. v1.0.0)
version_tag_format: "v{{version}}"
+ # The Github Team primarily responsible for handling incoming Pull Requests.
maintainer_group: chef/client-core
+ # Which Github branches to build Omnibus releases from, and what versions
+ # (as determined by the value in the VERSION file) those branches are responsible
+ # for building.
+ release_branch:
+ master:
+ version_constraint: ~> 13.0
+ chef-12:
+ version_constraint: ~> 12.0
+# These actions are taken, in order they are specified, anytime a Pull Request is merged.
merge_actions:
built_in:bump_version:
ignore_labels: "Version: Skip Bump"
bash:.expeditor/update_version.sh:
only_if: built_in:bump_version
+ built_in:update_changelog:
+ ignore_labels: "Meta: Exclude From Changelog"
built_in:trigger_omnibus_release_build:
ignore_labels: "Omnibus: Skip Build"
only_if: built_in:bump_version
+
+# These actions are taken, in the order specified, when an Omnibus artifact is promoted
+# within Chef's internal artifact storage system.
+artifact_actions:
+ promoted_to_unstable:
+ built_in:build_docker_image:
+ promoted_to_current:
+ built_in:tag_docker_image:
+ promoted_to_stable:
+ built_in:tag_docker_image:
+ built_in:publish_rubygems:
+ built_in:rollover_changelog:
+ bash:.expeditor/update_dockerfile.sh:
+
+
+###############################################################################
+# Notes on the tags inside CHANGELOG.md
+###############################################################################
+# latest_release
+# The content inside this block contains the most recent Pull Request to be
+# merged into the repository. When the `built_in:update_changelog` merge_action
+# is triggered, the content of this block is updated to reflect the most recent
+# Pull Request merged.
+#
+# release_rollup
+# This block contains all the Pull Requests merged since the most recent
+# Stable release. When the `built_in:update_changelog` merge_action is triggered,
+# the content inside this block is updated to include the most recent Pull Request
+# merged. When the `built_in:rollover_changelog` artifact_action is trggered,
+# the line items (each `-` line) are evaluated based on the version in the tags
+# at the end of the line (e.g. `<!-- 13.0.0 -->`). If the version is more recent
+# than the version that was just promoted (e.g. `> STABLE`), it is left in the
+# release_rollup section. Otherwise, it is moved into the `latest_stable_release`
+# section.
+#
+# latest_stable_release
+# This block contains a list of all the changes that were released in the latest
+# stable version. When the `built_in:rollover_changelog` artifact_action is triggerd,
+# the content inside this block is moved underneath it and the block is updated with
+# all of the line item chanages from the `release_rollup` block that were included in
+# the just released stable build (e.g. `> STABLE-1, <= STABLE`)
+#
diff --git a/.expeditor/update_dockerfile.sh b/.expeditor/update_dockerfile.sh
new file mode 100755
index 0000000000..9ae260fcb8
--- /dev/null
+++ b/.expeditor/update_dockerfile.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+#
+# This file updates the default VERSION build argument in the Dockerfile to the
+# VERSION passed in to the file via environment variables.
+
+set -evx
+
+sed -i -r "s/^ARG VERSION=.+/ARG VERSION=${VERSION}/" Dockerfile
diff --git a/.expeditor/update_version.sh b/.expeditor/update_version.sh
index 0dd9d0d65f..b2d76bc336 100644..100755
--- a/.expeditor/update_version.sh
+++ b/.expeditor/update_version.sh
@@ -6,28 +6,11 @@
set -evx
-# The github-changelog-generator requires that LANG be set
-export LANG=en_US.UTF-8
+sed -i -r "s/^(\s*)VERSION = \".+\"/\1VERSION = \"$(cat VERSION)\"/" chef-config/lib/chef-config/version.rb
+sed -i -r "s/VersionString\.new\(\".+\"\)/VersionString.new(\"$(cat VERSION)\")/" lib/chef/version.rb
-# Only install groups required to run the Rake command
-export BUNDLE_WITHOUT=omnibus_package:test:pry:integration:docgen:maintenance:travis:aix:bsd:linux:mac_os_x:solaris:windows:development
-
-# We need to run a bundle install so that our `bundle exec rake` command will work.
-gem environment
-omnibus_bundler=$(grep bundler omnibus_overrides.rb | cut -d'"' -f2)
-gem install bundler -v $omnibus_bundler --user-install --conservative
-bundle install
-
-# Run a rake command that will update various files in chef/chef-dk with the new VERSION
-bundle exec rake version:update
-
-# Run the following commands to update the changelog and dockerfile, but ignore errors.
-bundle exec rake changelog:update || true
-bundle exec rake update_dockerfile || true
-
-# Our `rake` command can sometimes modify this file, but we don't care about the
-# changes it makes. Reset it to HEAD.
-git checkout .bundle/config || true
+# Update the version inside Gemfile.lock
+bundle update chef chef-config
# Once Expeditor finshes executing this script, it will commit the changes and push
# the commit as a new tag corresponding to the value in the VERSION file.