Skip to content

Commit

Permalink
Fix image release process: master -> edge, tag -> latest (#2099)
Browse files Browse the repository at this point in the history
* fix version parsing
* repoint latest -> last released version, edge to master releases
  • Loading branch information
balopat authored May 9, 2019
1 parent a117236 commit fdc0d37
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ BUILD_PACKAGE = $(REPOPATH)/cmd/skaffold

VERSION_PACKAGE = $(REPOPATH)/pkg/skaffold/version
COMMIT = $(shell git rev-parse HEAD)
VERSION ?= $(shell git describe --always --tags --dirty)

ifeq "$(strip $(VERSION))" ""
override VERSION = $(shell git describe --always --tags --dirty)
endif

GO_GCFLAGS := "all=-trimpath=${PWD}"
GO_ASMFLAGS := "all=-trimpath=${PWD}"
Expand Down Expand Up @@ -97,6 +100,7 @@ release: cross $(BUILD_DIR)/VERSION
-f deploy/skaffold/Dockerfile \
--cache-from gcr.io/$(GCP_PROJECT)/skaffold-builder \
--build-arg VERSION=$(VERSION) \
-t gcr.io/$(GCP_PROJECT)/skaffold:latest \
-t gcr.io/$(GCP_PROJECT)/skaffold:$(VERSION) .
gsutil -m cp $(BUILD_DIR)/$(PROJECT)-* $(GSC_RELEASE_PATH)/
gsutil -m cp $(BUILD_DIR)/VERSION $(GSC_RELEASE_PATH)/VERSION
Expand All @@ -119,7 +123,7 @@ release-build: cross
docker build \
-f deploy/skaffold/Dockerfile \
--cache-from gcr.io/$(GCP_PROJECT)/skaffold-builder \
-t gcr.io/$(GCP_PROJECT)/skaffold:latest \
-t gcr.io/$(GCP_PROJECT)/skaffold:edge \
-t gcr.io/$(GCP_PROJECT)/skaffold:$(COMMIT) .
gsutil -m cp $(BUILD_DIR)/$(PROJECT)-* $(GSC_BUILD_PATH)/
gsutil -m cp -r $(GSC_BUILD_PATH)/* $(GSC_BUILD_LATEST)
Expand Down
1 change: 1 addition & 0 deletions deploy/cloudbuild-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ steps:

images:
- 'gcr.io/$PROJECT_ID/skaffold-builder:latest'
- 'gcr.io/$PROJECT_ID/skaffold:latest'
- 'gcr.io/$PROJECT_ID/skaffold:$TAG_NAME'

options:
Expand Down
2 changes: 1 addition & 1 deletion deploy/cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ steps:

images:
- 'gcr.io/$PROJECT_ID/skaffold-builder:latest'
- 'gcr.io/$PROJECT_ID/skaffold:latest'
- 'gcr.io/$PROJECT_ID/skaffold:edge'
- 'gcr.io/$PROJECT_ID/skaffold:$COMMIT_SHA'

options:
Expand Down
19 changes: 19 additions & 0 deletions docs/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,30 @@ For the latest **stable** release download and place it in your `PATH` as `skaff

https://storage.googleapis.com/skaffold/releases/latest/skaffold-windows-amd64.exe

### Bleeding edge binary

For the latest **bleeding edge** build, download and place it in your `PATH` as `skaffold.exe`:

https://storage.googleapis.com/skaffold/builds/latest/skaffold-windows-amd64.exe

{{% /tab %}}

{{% tab "DOCKER" %}}

### Stable binary

For the latest **stable** release, you can use:

`docker run gcr.io/k8s-skaffold/skaffold:latest skaffold <command>`

### Bleeding edge binary

For the latest **bleeding edge** build:

`docker run gcr.io/k8s-skaffold/skaffold:edge skaffold <command>`

{{% /tab %}}

{{% /tabs %}}

## Downloading the sample app
Expand Down

0 comments on commit fdc0d37

Please sign in to comment.