-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
scripts: Add tests for release scripts #13981
Conversation
31caa01
to
6a97d22
Compare
Codecov Report
@@ Coverage Diff @@
## main #13981 +/- ##
==========================================
- Coverage 72.67% 72.52% -0.16%
==========================================
Files 469 470 +1
Lines 38413 38497 +84
==========================================
+ Hits 27918 27920 +2
- Misses 8722 8789 +67
- Partials 1773 1788 +15
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
7aa9609
to
3746af9
Compare
Removing other workflows to speed up iteration |
105549c
to
d26d345
Compare
I see lots of workflow yaml files are removed, did you intentionally remove them? |
Removal of other workflows was just to speed up iteration. |
bee22cb
to
61a7c09
Compare
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.
@serathius lgtm, you know the release the best :) Thanks!
.github/workflows/release.yaml
Outdated
Name-Email: github-action@etcd.io | ||
Expire-Date: 0 | ||
EOF | ||
BRANCH=main ./scripts/release.sh --no-upload --no-docker-push 3.6.99 |
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.
Just curious about the value, 3.6.99? Thanks!
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.
I assume it's just value bigger than any 3.6 patch version released so far.
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.
Needed to pick a version to release script to run. I used 3.6
as I plan to add tests for other branches in next PRs. Picked .99
as wanted the version to correct but easy to distinguish from normal release. We could pick any other version that would fulfills those requirements.
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.
Sounds good. Thanks @serathius
Yeah, I was curious too thinking it's impact on CI and was thinking to ask Marek about it to understand it which he already answered now :) |
@@ -102,7 +102,7 @@ main() { | |||
|
|||
# Check go version. | |||
local go_version current_go_version | |||
go_version="go$(run_go_tool "github.com/mikefarah/yq/v3" read .github/workflows/build.yaml "jobs.build.steps[1].with.go-version")" | |||
go_version="go$(grep go-version .github/workflows/build.yaml | awk '{print $2}' | tr -d '"')" |
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.
curious. Why grep ?
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.
I was not able to manage to get the go tool to run in CI. It always failed saying that dependency is missing. It would be even harder if I wanted to use this approach to support old release branches.
.github/workflows/release.yaml
Outdated
Name-Email: github-action@etcd.io | ||
Expire-Date: 0 | ||
EOF | ||
BRANCH=main ./scripts/release.sh --no-upload --no-docker-push 3.6.99 |
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.
I assume it's just value bigger than any 3.6 patch version released so far.
.github/workflows/release.yaml
Outdated
Name-Email: github-action@etcd.io | ||
Expire-Date: 0 | ||
EOF | ||
BRANCH=main ./scripts/release.sh --no-upload --no-docker-push 3.6.99 |
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.
I would add DRY_RUN=true
here. I know it's the default... but I think it would improve the readability.
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.
sg
Ref #13980