Граф коммитов

27 Коммитов

Автор SHA1 Сообщение Дата
Dmitri Shuralyov 9b5ce82b5f cmd/releasebot: add support for major releases
There were a few places in releasebot that assumed the version
being made was a minor release (like go1.2.3) and didn't work
as expected for major releases (like go1.2). This change fixes
those, making releasebot suitable for creating major releases.

Computing the release branch and some of the error checking can
be factored out of doRelease to happen earlier. It's out of scope
for this CL, as it's better suited for a larger refactor later.

Fixes golang/go#34045

Change-Id: Id2204d372043e1fd2afc699d39412677c603f034
Reviewed-on: https://go-review.googlesource.com/c/build/+/193018
Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-09-10 01:23:21 +00:00
Dmitri Shuralyov a2cf19446e cmd/releasebot: set GO111MODULE=off for go get .../cmd/release
We specifically create a temporary GOPATH workspace in order to run
'go get golang.org/x/build/cmd/release' to install the release binary.
This was done with the intention to use GOPATH mode for the build.

Specify GO111MODULE=off explicitly so that GOPATH mode is always
used, regardless of local user configuration. This will produce
more consistent and reproducible results.

Installing the release binary in module mode is future work.

Fixes golang/go#33031

Change-Id: I1df009432be3d0af4e5e7679f38d147901d950e7
Reviewed-on: https://go-review.googlesource.com/c/build/+/193720
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-09-06 17:06:15 +00:00
Andrew Bonventre 6905690b3f cmd/releasebot: relax requirements for release documentation check
The current behavior is very strict (one newline after the <p> tag
and no indentation before the release name). Relax these requirements
to only check for "<release name> (released ".

This makes it work for major releases in addition to minor releases.

Change-Id: I541a7d5959f0e00b8a8b471e9ce8440c6253bd3a
Reviewed-on: https://go-review.googlesource.com/c/build/+/193057
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-09-06 16:52:13 +00:00
Dmitri Shuralyov 83da5c54f1 cmd/releasebot: don't reuse staging directories between runs
We don't want any files in the release staging directory from a
previous releasebot run to have a chance to influence a future run.
Start using a temporary directory inside <work>/release-staging to
prevent that from happening.

I considered cleaning the <work>/release-staging directory, but relying
on new temporary directories instead of os.RemoveAll seems safer. Users
can clean their go-releasebot-work directory themselves if they wish.

Change-Id: I2ca38267559aa356992faf7cbec9441c102aba45
Reviewed-on: https://go-review.googlesource.com/c/build/+/191166
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-08-22 18:25:23 +00:00
Dmitri Shuralyov 0d3a435684 cmd/releasebot: make problems with release easier to see
If the build releases step fails, stop there, instead of proceeding
or printing misleading next steps. Those next steps apply only after
the build releases step succeeds.

Also add a sentence at the end of the GitHub comment posted on the
release issue when there was a problem, so it's easier to see.

Fixes golang/go#33764
Updates golang/go#33760

Change-Id: Ice9ef155cd64173a2f48f96efc809634628d9165
Reviewed-on: https://go-review.googlesource.com/c/build/+/191162
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-08-21 22:05:12 +00:00
Dmitri Shuralyov 673ce34b0f cmd/releasebot, cmd/release: use releasebot work dir for staging releases
Using a directory inside the system temporary directory for staging
releases can be problematic, because os.Rename may fail to move the
file if /tmp is mounted on a filesystem that is different from where
the releasebot work directory is.

Use $HOME/go-releasebot-work/goX.Y.Z/release-staging as the staging
directory instead.

Change-Id: I74f5f6ace1c0df154a1de989e825f67e808d3c34
Reviewed-on: https://go-review.googlesource.com/c/build/+/191159
Reviewed-by: Andrew Bonventre <andybons@golang.org>
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-08-21 18:33:30 +00:00
Dmitri Shuralyov 6225d660dc cmd/release: create release archive after make.bash and before all.bash
Binary releases need to build Go and include binaries such as bin/go,
bin/gofmt, and others. Previously, this was accomplished by running
all.bash script for some GOOS/GOARCH pairs, and make.bash for others
where it wasn't viable to run tests as part of the release process.

This change makes the release process more consistent by always
packaging the release archive file after running make.bash. We still
run all.bash in situations where it was previously run, but we do so
after the release file has already been created. This avoids the
risk of any changes to GOROOT that may occur as part of all.bash
(including changing file permissions to be read-only) being included
in the final release file.

Add a step to check that files in the buildlet's $WORKDIR/go and
$WORKDIR/go/bin directories have expected permissions before
creating the release file.

Fixes golang/go#33537
Updates golang/go#30316

Change-Id: I7d40716dba656a8aca711377f2995df4880166c5
Reviewed-on: https://go-review.googlesource.com/c/build/+/189537
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2019-08-21 16:40:51 +00:00
Dmitri Shuralyov f0d9f776ba cmd/releasebot: don't mention release status issue in security release mode
There is no public release status issue in security release mode,
because we want to avoid the risk of leaking sensitive test failures.

Don't write the release status issue title to stdout, because that
makes it seem like there might be a public issue, which can be
worrisome to see when doing a security release.

Change-Id: Ice9b3fe1067a8d68cf8d22cd944a3b92a3abb606
Reviewed-on: https://go-review.googlesource.com/c/build/+/190801
Reviewed-by: Alexander Rakoczy <alex@golang.org>
2019-08-19 17:20:10 +00:00
Filippo Valsorda fc76638eb1 cmd/releasebot: skip tests on the second release round
The alternative was to key the cache by tree instead of by commit, which
currently should be perfectly valid, but make.bash seems cheap enough to
just rerun.

Change-Id: I8de031a6b7ebfbcf4ba1f903bbb14ef1d98cbfe1
Reviewed-on: https://go-review.googlesource.com/c/154342
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-01-09 19:54:22 +00:00
Filippo Valsorda 3c1c43f4d4 cmd/releasebot: run all.bash in prepare mode
Run cmd/release in prepare mode to get the all.bash tests to run on the
builders before the version commit is issued.

Also, scope the release artifacts by version commit, so there is never
any need to destroy them if the tag is reissued.

Change-Id: Idc14858c542f01b1652203758158d5e4972672c8
Reviewed-on: https://go-review.googlesource.com/c/154341
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-01-09 19:52:41 +00:00
Filippo Valsorda 5feef6d630 cmd/releasebot: remove support for parallel releases
The output would end up mixed to the point of being useless. releasebot
now supports parallelism at the terminal tab level.

Change-Id: I291954a88884452e71d3e3d0416301453aec8374
Reviewed-on: https://go-review.googlesource.com/c/154340
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2019-01-09 19:31:57 +00:00
Filippo Valsorda 6841fe2250 cmd/releasebot: don't try to recreate the tag when it already exists
Change-Id: I42865f871df540eeb98abd104a8c0560fdf34cd6
Reviewed-on: https://go-review.googlesource.com/c/154343
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
2019-01-05 00:45:49 +00:00
Filippo Valsorda 702928c3e4 cmd/releasebot: add support for security releases
Change-Id: I24f22a6101b550d459a4f4db1971e0c23ffae1d3
Reviewed-on: https://go-review.googlesource.com/c/153866
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-12-12 22:06:52 +00:00
Brad Fitzpatrick f7da0f8f06 all: warn if user hasn't run gcloud auth application-default login
"gcloud auth application-default login" is NOT the same as
"gcloud auth login"

... which is super confusing.

Add a check for users.

We should probably add this in more places over time. Baby steps.

Change-Id: I4584f5b84b941fa6893eccd09fd61e8850538607
Reviewed-on: https://go-review.googlesource.com/130195
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2018-08-21 02:14:17 +00:00
Filippo Valsorda b5f04f91c8 cmd/releasebot: add support for release candidates
Change-Id: If6553fa2b3f4a60f409186720f961f8eba4b7376
Reviewed-on: https://go-review.googlesource.com/129235
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-08-14 17:56:38 +00:00
Filippo Valsorda 82893f770d releasebot: allow resuming after the tag was created
Change-Id: I1023761af4997e51273dc636b865ab35fce7366e
Reviewed-on: https://go-review.googlesource.com/120761
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-06-25 22:38:30 +00:00
Filippo Valsorda 7f9f9beb17 cmd/releasebot: add support for beta releases
Change-Id: I20b4c68dd2512dc76f5751c200d487784b68670b
Reviewed-on: https://go-review.googlesource.com/119537
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-06-19 19:43:43 +00:00
Filippo Valsorda 98033f5827 cmd/releasebot: remove runDir and extraEnv object state
Change-Id: I361a42676926aaf92314a2681f519bbf21a1d612
Reviewed-on: https://go-review.googlesource.com/119536
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-06-19 19:41:48 +00:00
Filippo Valsorda 6ae3f185d4 cmd/releasebot: adapt to new minor release process
Split the process in two parts with a manual +2 and submit of the
release commit in the middle. This way the release manager doesn't need
to force submit anything, and the first stage stops before serious
write operations. This also made dry-run mode more complete and the
process easier to resume if something breaks.

Completely removed the beta and rc code as it got messy with the partial
rewrite and it would have just been broken untested code waiting to break.

Fixes golang/go#24902

Change-Id: I2cbd9bdf88e283d2ca527e5c91c620617d7e068e
Reviewed-on: https://go-review.googlesource.com/116357
Reviewed-by: Andrew Bonventre <andybons@golang.org>
2018-06-13 21:27:35 +00:00
Dmitri Shuralyov 5298ba98fb cmd/releasebot: check os.Stat error in loadGithubAuth
The error value returned from os.Stat call was not being checked.
This change fixes that.

Change-Id: I640c59275aa7adf21fa5ba52e1d114473ff3c82d
Reviewed-on: https://go-review.googlesource.com/103855
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-31 02:18:23 +00:00
Dmitri Shuralyov 35ebb6b410 cmd/releasebot: use comment ID in updateGithubComment
When editing a comment, the current code used the issue number in place
of the comment ID. But the EditComment endpoint needs the comment ID.

The issue number is not needed at all in updateGithubComment because the
EditComment endpoint uses the repository and comment ID to uniquely
identify the comment.

References:

-	https://developer.github.com/v3/issues/comments/#edit-a-comment.
-	https://godoc.org/github.com/google/go-github/github#IssuesService.EditComment.

Updates golang/go#24598.
Updates google/go-github#883.
Updates google/go-github#597.

Change-Id: Iae9d967d7be7a75b1bcee7118a3c80fe8f2375b4
Reviewed-on: https://go-review.googlesource.com/103398
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-03-30 23:40:26 +00:00
Andrew Bonventre de8714be58 cmd/releasebot: fix usage of GitHub client EditComment
It now expects an int64 for the id.

Fixes golang/go#24598

Change-Id: I40ac273087234bcf5d8726e8e4dce6350fa562ac
Reviewed-on: https://go-review.googlesource.com/103475
Reviewed-by: Kevin Burke <kev@inburke.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
2018-03-29 18:00:06 +00:00
Andrew Bonventre 06ed7b8c14 cmd/releasebot: allow final releases without an RC
Remove the requirement for a final release to have an RC, since
point releases may not have one.

Additionally adds some error logs when running ./make.bash

Change-Id: If52d19d01e9e2a49c16d9b55c782bd922637292b
Reviewed-on: https://go-review.googlesource.com/89037
Reviewed-by: Russ Cox <rsc@golang.org>
2018-01-23 01:03:02 +00:00
Andrew Bonventre 43e2754f63 cmd/releasebot: remove -s flag from which invocation
It’s not present on all platforms

Change-Id: Icbb5525084c9a5dbe5b429363729c406ed326478
Reviewed-on: https://go-review.googlesource.com/87396
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-11 18:39:05 +00:00
Andrew Bonventre 181a4325ba cmd/releasebot: add support for beta releases
Additionally:

+ Check that git-codereiew is installed or exit
+ Use fully qualified git-codereview commands (don't
  assume the user has installed the aliases)

Change-Id: Iaeaa28affec06d58b90ec295120169fd945edf90
Reviewed-on: https://go-review.googlesource.com/84615
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-19 17:27:32 +00:00
Andrew Bonventre 9f11edf3be cmd/releasebot: remove EDITOR=true hack in favor of --no-edit
The EDITOR env var is set to true to prevent git commit --amend
from pulling up an editor. Use the --no-edit command instead since
the desired behavior is the same only without the hack.

Change-Id: I29df9a566669ce56605169014b9e534b15811368
Reviewed-on: https://go-review.googlesource.com/83335
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-11 22:17:36 +00:00
Russ Cox eca02d2d17 cmd/releasebot: initial release process automation
There's more to do here but it's working well enough to be
very helpful. This is a snapshot of the final version used for
Go 1.8.5 and Go 1.9.2. I intend to keep revising it through
the next few point releases and also the main Go 1.10 release.

Change-Id: I4bdbed7ff92735213ff79bb7c4c983074e681ce4
Reviewed-on: https://go-review.googlesource.com/73333
Reviewed-by: Chris Broadfoot <cbro@golang.org>
2017-11-13 15:36:14 +00:00