discharger 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -10
- data/README.md +7 -2
- data/lib/discharger/task.rb +15 -4
- data/lib/discharger/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 25a6ab71ff65d9ada8fe82ce0a706b08d335aaa533b10c1b57a652434149cd91
|
|
4
|
+
data.tar.gz: 524b68d60300a017c7d83bc7162f1962819b44f1be1255ec1fd8651b47740374
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b67aaf1127f81ca25f3f4f78ce3fc5884920048baa022128b46dfa24e4ab01dee3b4574894d7e3305026cdfc7eb4659351b3cf649dc509e2d8c76982207bf01
|
|
7
|
+
data.tar.gz: 894a03d8fd806db6d0c831a1c47191332aa5cae0ab02fdf7709a040cab2e50f9e8a2ee02030d6e5015bfe2ab03d8a5e7ae806d6e79e9f0fe3f020a8f2cdc8a75
|
data/CHANGELOG.md
CHANGED
|
@@ -5,19 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
7
|
|
|
8
|
-
## [0.3.
|
|
8
|
+
## [0.3.4] - 2026-07-22
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
## [0.3.2] - 2026-07-15
|
|
15
|
-
|
|
16
|
-
### Changed
|
|
12
|
+
- Runbook announcement on stage builds, previewing post-release steps before production (c77b552)
|
|
17
13
|
|
|
18
|
-
|
|
14
|
+
## [0.3.3] - 2026-07-22
|
|
19
15
|
|
|
20
|
-
###
|
|
16
|
+
### Added
|
|
21
17
|
|
|
22
|
-
-
|
|
23
|
-
- pg-tools wrappers no longer forward localhost -h/-p flags into docker exec, where the host-mapped port doesn't exist; remote hosts still pass through untouched (a3869d2)
|
|
18
|
+
- Post-release runbook announcement in the Slack release thread, from Reissue's runbook_file (0cf9620)
|
data/README.md
CHANGED
|
@@ -112,8 +112,10 @@ Runbook: Run \`rake data:cleanup\` after deploy"
|
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
`rake release:prepare` finalizes the runbook alongside the changelog, so the release tag
|
|
115
|
-
records exactly which steps that version needs.
|
|
116
|
-
|
|
115
|
+
records exactly which steps that version needs. Discharger posts the checklist to Slack as
|
|
116
|
+
a reply in the deploy thread — both on the stage build (`rake release:build` /
|
|
117
|
+
`rake release:stage`, threaded under "Building…") and after the production release
|
|
118
|
+
(threaded under the release announcement, right after the changelog):
|
|
117
119
|
|
|
118
120
|
```
|
|
119
121
|
*Post-release runbook for 1.2.3* — 2 steps
|
|
@@ -122,6 +124,9 @@ posts the checklist to Slack as a reply in the release thread, right after the c
|
|
|
122
124
|
• Re-index search documents (def5678)
|
|
123
125
|
```
|
|
124
126
|
|
|
127
|
+
Staging shows the steps as a preview so the team sees what production will need before it
|
|
128
|
+
happens; the production thread repeats them when the release actually lands.
|
|
129
|
+
|
|
125
130
|
When a release needs no follow-up, the thread says so explicitly rather than staying
|
|
126
131
|
silent, so nobody has to wonder whether the check was skipped:
|
|
127
132
|
|
data/lib/discharger/task.rb
CHANGED
|
@@ -201,6 +201,19 @@ module Discharger
|
|
|
201
201
|
items.map { |item| "• #{item}" }.join("\n")
|
|
202
202
|
end
|
|
203
203
|
|
|
204
|
+
# Post the runbook as a reply in a Slack thread, when a runbook is
|
|
205
|
+
# configured. Reuses the same message on the stage build and the
|
|
206
|
+
# production release. Returns the message posted, or nil when there is
|
|
207
|
+
# no thread to reply to or no runbook to announce.
|
|
208
|
+
def post_runbook_to_thread(version, thread_ts)
|
|
209
|
+
return unless thread_ts.present?
|
|
210
|
+
return unless (message = runbook_announcement(version))
|
|
211
|
+
|
|
212
|
+
tasker["#{name}:slack"].reenable
|
|
213
|
+
tasker["#{name}:slack"].invoke(message, release_message_channel, ":clipboard:", thread_ts)
|
|
214
|
+
message
|
|
215
|
+
end
|
|
216
|
+
|
|
204
217
|
def existing_pr_number(base, head)
|
|
205
218
|
stdout, _, status = Open3.capture3(
|
|
206
219
|
"gh", "pr", "list",
|
|
@@ -315,10 +328,7 @@ module Discharger
|
|
|
315
328
|
tasker["#{name}:slack"].reenable
|
|
316
329
|
tasker["#{name}:slack"].invoke(text, release_message_channel, ":log:", thread_ts)
|
|
317
330
|
|
|
318
|
-
|
|
319
|
-
tasker["#{name}:slack"].reenable
|
|
320
|
-
tasker["#{name}:slack"].invoke(runbook_message, release_message_channel, ":clipboard:", thread_ts)
|
|
321
|
-
end
|
|
331
|
+
post_runbook_to_thread(current_version, thread_ts)
|
|
322
332
|
end
|
|
323
333
|
# Signal success — no branch switch needed since we stay on working_branch throughout
|
|
324
334
|
true
|
|
@@ -385,6 +395,7 @@ module Discharger
|
|
|
385
395
|
) do
|
|
386
396
|
current_version = Object.const_get(version_constant)
|
|
387
397
|
tasker["#{name}:slack"].invoke("Building #{app_name} #{current_version} (#{commit_identifier.call}) on #{staging_branch}.", release_message_channel)
|
|
398
|
+
post_runbook_to_thread(current_version, last_message_ts)
|
|
388
399
|
syscall ["git checkout #{build_branch}"]
|
|
389
400
|
end
|
|
390
401
|
end
|
data/lib/discharger/version.rb
CHANGED