-
Notifications
You must be signed in to change notification settings - Fork 10
Conversation
UPDATE: When you make a new Release on GitHub the Stage cron job is automatically upgraded. But the Stage Lambda job is not. That requires filing a bug. Will amend the script to help with that. |
Instead of pinging OPs on bugzilla about the lambda zip. Issue #423 is about instead "baking" the lambda code into the release (via Circle) process directly. We still need a Bugzilla bug for every Prod deployment. |
Also, I used: ▶ ./bin/deployment-bug.py stage lambda
To file this bug, click (or copy) this URL:
👇
https://bugzilla.mozilla.org/enter_bug.cgi?qa_contact=chartjes%40mozilla.com&comment=Could+you+please+update+the+Lambda+function+for+Buildhub+Stage+with+the+following+one%3F%0A%0Ahttps%3A%2F%2Fgithub.com%2Fmozilla-services%2Fbuildhub%2Freleases%2Ftag%2Fv1.2.0%0A%0Ahttps%3A%2F%2Fgithub.com%2Fmozilla-services%2Fbuildhub%2Freleases%2Fdownload%2Fv1.2.0%2Fbuildhub-lambda-v1.2.0.zip%0A%0AThanks%21&short_desc=On+Stage%2C+please+deploy+Buildhub+Lambda+function+v1.2.0&component=Operations%3A+Storage&product=Cloud+Services&bug_file_loc=https%3A%2F%2Fgithub.com%2Fmozilla-services%2Fbuildhub%2Freleases%2Ftag%2Fv1.2.0
👆 To help me make this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1456446 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the buildhub repo never received so much love 😄
Thanks for this!!
|
||
To upgrade the cron job _and_ Lambda job on **Prod** run: | ||
|
||
./bin/deployment-bug.py prod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
bin/make-release.py
Outdated
return | ||
if ok.lower().strip() == 'n': | ||
print('Tip! Generate it by running: make lambda.zip ') | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you may want to return a value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/me done.
'-s', | ||
'-a', tag_name, | ||
'-m', tag_body, | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of having several places with check_call
/ check_output
+ decode, and a if dry_run
switch, you could have a small helper :
output = run_command(f"git tag -s -a {tag_name} -m {tag_body}", dry_run=dry_run)\
bin/make-release.py
Outdated
if args.part not in ('major', 'minor', 'patch'): | ||
parser.error("invalid part. Must be 'major', 'minor', or 'patch'") | ||
args = vars(args) | ||
main(args.pop('part'), **args) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sys.exit(main(...))
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Fixed now.
▶ GITHUB_API_KEY=895fxxxxxce09 ./bin/make-release.py patch -d
The lambda.zip...
Last modified: 23 April 2018 - 14:07:37
Age: 22 hours 18 minutes ago
Is this lambda.zip recently generated? [Y/n] n
Tip! Generate it by running: make lambda.zip
(buildhub)
MOZILLA/BUILDHUB/buildhub make-release-script ✗ ▶ echo $?
3
It's not perfect but I'll land it now. It works and can be improved later. |
👍 |
This is work in progress but would be nice to have some eyes on it. Basically, I'm trying to completely automate the steps in the README.
I used this script to generate this: https://github.com/mozilla-services/buildhub/releases/tag/v1.2.0
The only thing it doesn't do is the pinging on Bugzilla to ask OPs(*) to deploy it on prod. As far as I can understand, simply making a release will upgrade Stage. So I want to test that first.
Thing is, if I make a tag & release, it's very unlikely that I want to ask OPs to take that to prod. As soon as I've made a tag, I want to watch/watching Stage to see that the release works there. Then, perhaps a day later or so I'll go to OPs and say "I've been watching release v1.2.0 on Stage. It seems to work. Please go ahead and put this in Prod."
(*) By that I mean, filing a bug.