-
Notifications
You must be signed in to change notification settings - Fork 397
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
WIP: release using goreleaser #516
Conversation
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.
So far so good! I spent some time trying this against my own fork, and have a few pieces of feedback:
- If
make release
fails during thescripts/release.sh
step for some reason (ie, not being able to connect to Docker, repo is in a dirty state, access to Dockerhub is denied, etc), simply retrying themake release
task could cause unexpected behaviour for the user invoking it. This is because the version is already bumped, and a tag on the repo is already created, so whenmake release
is invoked again, a new version and tag is created, instead of re-tryingscripts/release.sh
on the existing version and tag. Maybe there's a way to detect this and retryscripts/releash.sh
if that fails? Maybe checking if the branch name matchestags/x.x.x
? - Related to the steps above, there might be a few more things we want to mention so that users can avoid failures related to
goreleaser
. In prerequisites, we should consider mentioning,- That you need Docker running on the machine you want to release from,
- That you need to be logged in (via
docker login
, for example), - That your repo must not be in a dirty state (because
goreleaser
doesn't like that).
Keep in mind that my comments above assume that a human will use this script – if the intention is for this to only ever be done on CI, then my feedback may not apply.
For now, humans will run I have multiple steps under the hood, I just need to rejigger / expose those steps, as well as annotate what to do if the process dies in an interim state. |
Oh, and it isn't |
@hilary I think
|
Ah, right. I check for staged but uncommitted changes, iirc. |
Ok, I've hardened quite a bit. Re: dirty state. Releasing now defaults to |
|
||
You will also need a valid `GITHUB_TOKEN` environment variable with access to the `digitalocean/doctl` repo. You can generate a token [here](https://github.com/settings/tokens), it needs the `public_repo` access. | ||
* a valid dockerhub login with access to the `digitalocean` account. Post | ||
in #it_support to request access. |
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.
Post in #in_support to request access.
We might want to add a note that this is for DO employees only, just to avoid confusion for any public contributors.
Moving branch to digitalocean account, opened #521 |
TODO: