-
Notifications
You must be signed in to change notification settings - Fork 382
Publish svcat binaries during build #1725
Publish svcat binaries during build #1725
Conversation
RE the secret, we generally put them into travis as env vars |
b97e55d
to
0c785db
Compare
@arschles Rebased and ready for review. |
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.
LGTM, thanks @carolynvs
Does this also result in PR/master merge binaries as their git sha?
|
I tweaked how we set This was necessary so that * UPDATE: I am confused. 😀 Looking at quay we do have images tagged this way but when I run tagged commit$ git checkout v0.0.1
$ git describe --always --abbrev=7 --dirty --match=v*
2f0aebc
$ git describe --tags --abbrev=7 --dirty --match=v*
v0.0.1 untagged commit$ git checkout 0c785db
$ git describe --tags --abbrev=7 --dirty --match=v*
v0.1.7-10-g0c785db
$ git describe --always --abbrev=7 --dirty --match=v*
0c785db Deploy Logic
The idea behind latest is that we can provide a permanent link to the most recent stable release of svcat. If someone wants to install a unreleased version, I would recommend building locally. |
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.
Thanks for the summary. Maybe we want to save this into the repo as a commit message or docs. Both the first opening message details as well the summary of behavior
LGTM
@@ -363,13 +373,30 @@ release-push-%: | |||
$(MAKE) ARCH=$* build | |||
$(MAKE) ARCH=$* push | |||
|
|||
# SvCat Kubectl plugin stuff | |||
# svcat kubectl plugin |
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 dunno, I like stuff
Makefile
Outdated
@@ -32,7 +32,8 @@ SRC_DIRS = $(shell sh -c "find $(TOP_SRC_DIRS) -name \\*.go \ | |||
-exec dirname {} \\; | sort | uniq") | |||
TEST_DIRS ?= $(shell sh -c "find $(TOP_SRC_DIRS) -name \\*_test.go \ | |||
-exec dirname {} \\; | sort | uniq") | |||
VERSION ?= $(shell git describe --always --abbrev=7 --dirty) | |||
VERSION ?= $(shell git describe --tags --abbrev=7 --dirty --match=v*) |
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 worry that this will confuse people who check quay.io for what version they of Service Catalog they should run. The tag name will now look something like v0.1.8-8-gb1da783
, which is very verbose and not clear at first glance what its structure is.
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'll undo this change.
@carolynvs Do you mean how we have sha-tagged images and v0.X.X-tagged images in quay? That's because |
@carolynvs So, the intent is then that we will have our "core" releases just push service catalog images, and different "svcat" releases that push the svcat binaries? If so, that seems fine, though I'm curious what other repos do in this situation. For kubernetes/kubernetes vs kubectl, it looks like the versions are kept in strict alignment and released simultaneously for every patch; is that correct? |
Yes, that's what it looks like. I originally did it this way because I wasn't confident that y'all would be okay with bumping the server version when perhaps all of the changes were in the client. If you are okay with that, then I would prefer to version them together. That way it would be easy to know that one has the proper client version to go with their server. If you agree, I'll redo this to use the same version for both (along with tweaking the tag changes so that pushes to master result in images without any version information included to preserve existing behavior). |
I just added a related issue, #1752, to have |
I think I like using the same version better, though it would make things like trying to add breaking changes to the CLI more difficult. But we're probably in a stable enough state at the moment that that hopefully won't be too much of an issue. |
I'll update the PR today to make that change then and resist the temptation to constantly make breaking changes to svcat. 😉 |
d49c895
to
9c47974
Compare
I have updated the PR to:
|
LGTM, just one final |
* svcat-all builds all supported client platforms (darwin, linux, windows) * svcat-for-X builds a specific platform * svcat builds for the current dev's platform
Versions for svcat are tracked using svcat-vX.Y.Z tags. Versions for service catalog continue to use vX.Y.Z. I've fixed the VERSION variable to contain the tag value to account for not using annotated tags. Since there are no existing versions for svcat yet I have a small hack to print v0 so that the first PR can build. We can remove that once we have tags.
Download the latest client with https://download.svcat.sh/cli/latest/darwin/amd64/svcat Download an older client with https://download.svcat.sh/cli/VERSION/darwin/amd64/svcat
* Renamed from SVCAT_VERSION to TAG_VERSION to make it clear that it's only a formatting difference. * The cli uses the format that always includes a tag, so that it's clear which release you are "closest" to, e.g. v1.2.3 for official releases and v1.2.3-2-gabc123 for untagged commits.
9c47974
to
d9b040d
Compare
I've rebased. The travis build needs to be retried however; it hit a transient network error.
|
🎉 IT'S ALIVE! |
bumped travis. green nbuiuld. |
make svcat-all
builds all supported client platforms (darwin, linux, windows).make svcat-for-X
builds a specific platform.make svcat
builds for the current dev's platform.make svcat-publish
compiles everything and uploads the binaries.Versions for svcat are tracked using svcat-vX.Y.Z tags.UPDATE: The same tags are used for both client and server. The cli uses the format that always includes a tag, so that it's clear which release you are "closest" to, e.g. v1.2.3 for official releases and v1.2.3-2-gabc123 for untagged commits.I've fixed the VERSION variable to contain the tag value to account for not using annotated tags.UPDATE: Reverted to maintain current docker image tags.Since there are no existing versions for svcat yet I have a small hack to print v0 so that the first PR can build. We can remove that once we have svcat tags in the repo.
TODO: