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.
Fixesgolang/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>
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.
Fixesgolang/go#33031
Change-Id: I1df009432be3d0af4e5e7679f38d147901d950e7
Reviewed-on: https://go-review.googlesource.com/c/build/+/193720
Reviewed-by: Alexander Rakoczy <alex@golang.org>
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>
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>
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.
Fixesgolang/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>
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>
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.
Fixesgolang/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>
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>
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>
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>
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>
"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>
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.
Fixesgolang/go#24902
Change-Id: I2cbd9bdf88e283d2ca527e5c91c620617d7e068e
Reviewed-on: https://go-review.googlesource.com/116357
Reviewed-by: Andrew Bonventre <andybons@golang.org>
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>
It now expects an int64 for the id.
Fixesgolang/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>
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>
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>
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>
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>
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>