Skip to content

Commit

Permalink
fix: set the correct KIB version ami tag
Browse files Browse the repository at this point in the history
Previously this was always defaulting to `0.0.1` from the fallback value
in `pkg/packer/manifests/aws/packer.json.tmpl`.
  • Loading branch information
jkoelker committed Jan 6, 2022
1 parent b8ecfc5 commit d92dd74
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -351,11 +351,15 @@ bin/konvoy-image: $(shell find $(REPO_ROOT_DIR)/pkg -type f -name '*'.go)
bin/konvoy-image: $(shell find $(REPO_ROOT_DIR)/pkg -type f -name '*'.tmpl)
bin/konvoy-image:
$(call print-target)
go build -o ./bin/konvoy-image ./cmd/konvoy-image/main.go
go build \
-ldflags="-X github.com/mesosphere/konvoy-image-builder/pkg/version.version=$(REPO_REV)" \
-o ./bin/konvoy-image ./cmd/konvoy-image/main.go

bin/konvoy-image-wrapper:
$(call print-target)
go build -o ./bin/konvoy-image-wrapper ./cmd/konvoy-image-wrapper/main.go
go build \
-ldflags="-X github.com/mesosphere/konvoy-image-builder/pkg/version.version=$(REPO_REV)" \
-o ./bin/konvoy-image-wrapper ./cmd/konvoy-image-wrapper/main.go

dist/konvoy-image_linux_amd64/konvoy-image: $(REPO_ROOT_DIR)/cmd
dist/konvoy-image_linux_amd64/konvoy-image: $(shell find $(REPO_ROOT_DIR)/cmd -type f -name '*'.go)
Expand Down
3 changes: 3 additions & 0 deletions pkg/app/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/mesosphere/konvoy-image-builder/pkg/appansible"
"github.com/mesosphere/konvoy-image-builder/pkg/packer"
"github.com/mesosphere/konvoy-image-builder/pkg/stringutil"
"github.com/mesosphere/konvoy-image-builder/pkg/version"
)

const (
Expand All @@ -44,6 +45,7 @@ const (
packerBuilderRegionKey = "aws_region"
packerAMIRegionsKey = "ami_regions"
packerInstanceType = "aws_instance_type"
packerKIBVersionKey = "konvoy_image_builder_version"

ansibleVarsFilename = "ansible_vars.yaml"
)
Expand Down Expand Up @@ -302,6 +304,7 @@ func genPackerVars(config map[string]interface{}, extraVarsPath string) ([]byte,
p[httpProxyKey] = getString(config, httpProxyKey)
p[httpsProxyKey] = getString(config, httpsProxyKey)
p[noProxyKey] = getString(config, noProxyKey)
p[packerKIBVersionKey] = version.Version()

data, err := json.Marshal(p)
if err != nil {
Expand Down

0 comments on commit d92dd74

Please sign in to comment.