summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2021-09-21 14:50:47 -0700
committerTim Smith <tsmith84@gmail.com>2021-09-21 14:53:04 -0700
commit2e8fa8924c860cbb31d7b6109d252ac05a1660bb (patch)
treed803094cbe3ab9739101a48e4994d52e613d1553
parent17ca4f949e3a0cf2c4769c533f6b32b64e4f0f97 (diff)
downloadchef-2e8fa8924c860cbb31d7b6109d252ac05a1660bb.tar.gz
Automate release announcements for chef 16
Signed-off-by: Tim Smith <tsmith@chef.io>
-rwxr-xr-x.expeditor/announce-release.sh45
-rw-r--r--.expeditor/config.yml73
-rwxr-xr-x.expeditor/publish-release-notes.sh32
-rwxr-xr-x.expeditor/scripts/install-hab.sh2
-rw-r--r--.expeditor/update_dep.sh2
5 files changed, 123 insertions, 31 deletions
diff --git a/.expeditor/announce-release.sh b/.expeditor/announce-release.sh
new file mode 100755
index 0000000000..58d1b1e463
--- /dev/null
+++ b/.expeditor/announce-release.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+
+set -exou pipefail
+
+# Download the release-notes for our specific build
+curl -o release-notes.md "https://packages.chef.io/release-notes/${EXPEDITOR_PRODUCT_KEY}/${EXPEDITOR_VERSION}.md"
+
+topic_title="Chef Infra Client $EXPEDITOR_VERSION Released!"
+topic_body=$(cat <<EOH
+We are delighted to announce the availability of version $EXPEDITOR_VERSION of Chef Infra Client.
+
+$(cat release-notes.md)
+
+---
+## Get the Build
+
+As always, you can download binaries directly from [downloads.chef.io](https://downloads.chef.io/products/infra?v=${EXPEDITOR_VERSION}) or by using the `mixlib-install` command-line utility:
+
+```
+$ mixlib-install download chef -v ${EXPEDITOR_VERSION}
+```
+
+Alternatively, you can install Chef Infra Client using one of the following command options:
+
+```
+# In Shell
+$ curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chef -v ${EXPEDITOR_VERSION}
+# In Windows Powershell
+. { iwr -useb https://omnitruck.chef.io/install.ps1 } | iex; install -project chef -version ${EXPEDITOR_VERSION}
+```
+If you want to give this version a spin in Test Kitchen, create or add the following to your `kitchen.yml` file:
+
+```
+provisioner:
+ product_name: chef
+ product_version: ${EXPEDITOR_VERSION}
+```
+EOH
+)
+
+# Use Expeditor's built in Bash helper to post our message: https://git.io/JvxPm
+post_discourse_release_announcement "$topic_title" "$topic_body"
+
+# Cleanup
+rm release-notes.md
diff --git a/.expeditor/config.yml b/.expeditor/config.yml
index 2fb2ebef4d..bf037cbee1 100644
--- a/.expeditor/config.yml
+++ b/.expeditor/config.yml
@@ -43,16 +43,14 @@ github:
major_bump_labels:
- "Expeditor: Bump Version Major"
-# Which Github branches to build Omnibus releases from, and what versions
+# 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_branches:
- - master:
+ - main:
version_constraint: 17*
- chef-16:
version_constraint: 16*
- - chef-15:
- version_constraint: 15*
changelog:
rollup_header: Changes not yet released to stable
@@ -69,11 +67,37 @@ subscriptions:
actions:
- built_in:rollover_changelog
- bash:.expeditor/update_dockerfile.sh
+ - bash:.expeditor/publish-release-notes.sh
+ - bash:.expeditor/announce-release.sh
- built_in:promote_docker_images
- built_in:publish_rubygems
- built_in:promote_habitat_packages
- built_in:notify_chefio_slack_channels
+ # 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"
+ - trigger_pipeline:habitat/build:
+ ignore_labels:
+ - "Expeditor: Skip Habitat"
+ - "Expeditor: Skip All"
+ only_if: built_in:bump_version
+ - trigger_pipeline:omnibus/release:
+ ignore_labels:
+ - "Expeditor: Skip Omnibus"
+ - "Expeditor: Skip All"
+ only_if: built_in:bump_version
+
# the habitat chain
- workload: buildkite_hab_build_group_published:{{agent_id}}:*
actions:
@@ -120,6 +144,21 @@ subscriptions:
- workload: ruby_gem_published:win32-taskscheduler-*
actions:
- bash:.expeditor/update_dep.sh
+ - workload: ruby_gem_published:win32-certstore-*
+ actions:
+ - bash:.expeditor/update_dep.sh
+ - workload: ruby_gem_published:win32-event-*
+ actions:
+ - bash:.expeditor/update_dep.sh
+ - workload: ruby_gem_published:win32-mutex-*
+ actions:
+ - bash:.expeditor/update_dep.sh
+ - workload: ruby_gem_published:win32-eventlog-*
+ actions:
+ - bash:.expeditor/update_dep.sh
+ - workload: ruby_gem_published:win32-api-*
+ actions:
+ - bash:.expeditor/update_dep.sh
- workload: ruby_gem_published:ffi-yajl-*
actions:
- bash:.expeditor/update_dep.sh
@@ -185,28 +224,4 @@ subscriptions:
- bash:.expeditor/update_dep.sh
- workload: ruby_gem_published:fauxhai-ng-*
actions:
- - bash:.expeditor/update_dep.sh
-
- # 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"
- - trigger_pipeline:habitat/build:
- ignore_labels:
- - "Expeditor: Skip Habitat"
- - "Expeditor: Skip All"
- only_if: built_in:bump_version
- - trigger_pipeline:omnibus/release:
- ignore_labels:
- - "Expeditor: Skip Omnibus"
- - "Expeditor: Skip All"
- only_if: built_in:bump_version \ No newline at end of file
+ - bash:.expeditor/update_dep.sh \ No newline at end of file
diff --git a/.expeditor/publish-release-notes.sh b/.expeditor/publish-release-notes.sh
new file mode 100755
index 0000000000..e8f32045bf
--- /dev/null
+++ b/.expeditor/publish-release-notes.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+set -eou pipefail
+
+git clone https://x-access-token:${GITHUB_TOKEN}@github.com/chef/chef.wiki.git
+
+pushd ./chef.wiki
+ # Publish release notes to S3
+ aws s3 cp Pending-Release-Notes-16.md "s3://chef-automate-artifacts/release-notes/${EXPEDITOR_PRODUCT_KEY}/${EXPEDITOR_VERSION}.md" --acl public-read --content-type "text/plain" --profile chef-cd
+ aws s3 cp Pending-Release-Notes-16.md "s3://chef-automate-artifacts/${EXPEDITOR_CHANNEL}/latest/${EXPEDITOR_PRODUCT_KEY}/release-notes.md" --acl public-read --content-type "text/plain" --profile chef-cd
+
+ # Reset "Stable Release Notes" wiki page
+ cat >./Pending-Release-Notes-16.md <<EOH
+## Compliance Phase Improvements
+
+## New Resources
+
+## Resource Updates
+
+## Packaging
+
+## Security
+
+EOH
+
+ # Push changes back up to GitHub
+ git add .
+ git commit -m "Release Notes for promoted build $EXPEDITOR_VERSION"
+ git push origin master
+popd
+
+rm -rf chef.wiki
diff --git a/.expeditor/scripts/install-hab.sh b/.expeditor/scripts/install-hab.sh
index 75e910bfab..aaf2dfee5f 100755
--- a/.expeditor/scripts/install-hab.sh
+++ b/.expeditor/scripts/install-hab.sh
@@ -20,5 +20,5 @@ error () {
echo "--- :habicat: Installing latest version of Habitat"
rm -rf /hab
-curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | bash -s -- -t "$hab_target"
+curl https://raw.githubusercontent.com/habitat-sh/habitat/main/components/hab/install.sh | bash -s -- -t "$hab_target"
hab license accept
diff --git a/.expeditor/update_dep.sh b/.expeditor/update_dep.sh
index baf950c408..76ed6d90da 100644
--- a/.expeditor/update_dep.sh
+++ b/.expeditor/update_dep.sh
@@ -38,6 +38,6 @@ git commit --message "Bump $EXPEDITOR_GEM_NAME to $EXPEDITOR_VERSION" --message
open_pull_request "$EXPEDITOR_BRANCH"
-# Get back to master and cleanup the leftovers - any changed files left over at the end of this script will get committed to master.
+# Get back to main and cleanup the leftovers - any changed files left over at the end of this script will get committed to main.
git checkout -
git branch -D "$branch"