diff --git a/.goreleaser.yml b/.goreleaser.yml index bc06ef4fed..dfc1993e33 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -36,12 +36,12 @@ builds: goos: *goos goarch: *goarch dockers: -- binaries: +- ids: - controller image_templates: - 'ghcr.io/kanisterio/controller:{{ .Tag }}' dockerfile: 'docker/controller/Dockerfile' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/kanister-tools:{{ .Tag }}' @@ -50,12 +50,12 @@ dockers: - "--build-arg=kan_tools_version={{ .Tag }}" extra_files: - 'LICENSE' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/postgres-kanister-tools:{{ .Tag }}' dockerfile: 'docker/postgres-kanister-tools/Dockerfile' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/postgres-tools-9.6:{{ .Tag }}' @@ -63,7 +63,7 @@ dockers: - image_templates: - 'ghcr.io/kanisterio/postgresql:{{ .Tag }}' dockerfile: 'docker/postgresql/Dockerfile' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/es-sidecar:{{ .Tag }}' @@ -72,7 +72,7 @@ dockers: - "--build-arg=TOOLS_IMAGE=ghcr.io/kanisterio/kanister-tools:{{ .Tag }}" extra_files: - 'docker/kanister-elasticsearch/image/esdump-setup.sh' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/mysql-sidecar:{{ .Tag }}' @@ -84,7 +84,7 @@ dockers: dockerfile: 'docker/kanister-kubectl/Dockerfile' build_flag_templates: - "--build-arg=TOOLS_IMAGE=ghcr.io/kanisterio/kanister-tools:{{ .Tag }}" -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/mongo-sidecar:{{ .Tag }}' @@ -94,22 +94,22 @@ dockers: - 'docker/kanister-mongodb-replicaset/image/90forceyes' - 'docker/kanister-mongodb-replicaset/image/config' - 'docker/kanister-mongodb-replicaset/image/gbl_env.sh' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/mongodb:{{ .Tag }}' dockerfile: 'docker/mongodb/Dockerfile' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/cassandra:{{ .Tag }}' dockerfile: 'docker/cassandra/Dockerfile' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/couchbase-tools:{{ .Tag }}' dockerfile: 'docker/couchbase-tools/Dockerfile' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/foundationdb:{{ .Tag }}' @@ -120,7 +120,7 @@ dockers: extra_files: - 'docker/kafka-adobes3Connector/image/adobe-monitorsource.sh' - 'docker/kafka-adobes3Connector/image/cleans3.py' -- binaries: +- ids: - kando image_templates: - 'ghcr.io/kanisterio/kafka-adobe-s3-sink-connector:{{ .Tag }}' @@ -137,3 +137,5 @@ changelog: exclude: - '^docs:' - '^test:' +archives: + - allow_different_binary_count: true diff --git a/Makefile b/Makefile index 80e98ec815..db2298f2dd 100644 --- a/Makefile +++ b/Makefile @@ -57,7 +57,7 @@ IMAGE_NAME := $(BIN) IMAGE := $(REGISTRY)/$(IMAGE_NAME) -BUILD_IMAGE ?= ghcr.io/kanisterio/build:v0.0.14 +BUILD_IMAGE ?= ghcr.io/kanisterio/build:v0.0.15 # tag 0.1.0 is, 0.0.1 (latest) + gh + aws + helm binary DOCS_BUILD_IMAGE ?= ghcr.io/kanisterio/docker-sphinx:0.2.0 @@ -88,6 +88,12 @@ all-push: $(addprefix push-, $(ALL_ARCH)) build: bin/$(ARCH)/$(BIN) +build-controller: + @$(MAKE) run CMD='-c " \ + goreleaser build --id $(BIN) --rm-dist --debug --snapshot \ + && cp dist/$(BIN)_linux_$(ARCH)/$(BIN) bin/$(ARCH)/$(BIN) \ + "' + bin/$(ARCH)/$(BIN): @echo "building: $@" @$(MAKE) run CMD='-c " \ @@ -245,7 +251,7 @@ gorelease: @$(MAKE) run CMD='-c "./build/gorelease.sh"' release-snapshot: - @$(MAKE) run CMD='-c "GORELEASER_CURRENT_TAG=latest goreleaser --debug release --rm-dist --snapshot"' + @$(MAKE) run CMD='-c "GORELEASER_CURRENT_TAG=v9.99.9-dev goreleaser --debug release --rm-dist --snapshot"' go-mod-download: @$(MAKE) run CMD='-c "go mod download"' diff --git a/build/push_images.sh b/build/push_images.sh index a1b4666a39..cf9c04fa65 100755 --- a/build/push_images.sh +++ b/build/push_images.sh @@ -20,7 +20,7 @@ set -o nounset IMAGE_REGISTRY="ghcr.io/kanisterio" IMAGES=("mysql-sidecar" "kafka-adobe-s3-sink-connector" "postgres-kanister-tools" "postgresql" "postgres-tools-9.6" "cassandra" "kanister-kubectl-1.18" "mongo-sidecar" "mongodb" "es-sidecar" "controller" "kanister-tools" "couchbase-tools" "kafka-adobe-s3-source-connector" "foundationdb") -TAG=${1:-"latest"} +TAG=${1:-"v9.99.9-dev"} for i in ${IMAGES[@]}; do docker push $IMAGE_REGISTRY/$i:$TAG diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index 761cc178b6..4d24c190e9 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -10,7 +10,7 @@ COPY --from=golang:1.16.8-alpine3.14 /usr/local/go/ /usr/local/go/ COPY --from=bitnami/kubectl:1.17 /opt/bitnami/kubectl/bin/kubectl /usr/local/bin/ -COPY --from=goreleaser/goreleaser:v0.127.0 /bin/goreleaser /usr/local/bin/ +COPY --from=goreleaser/goreleaser:v1.2.4 /usr/local/bin/goreleaser /usr/local/bin/ COPY --from=alpine/helm:3.1.0 /usr/bin/helm /usr/local/bin/ diff --git a/pkg/app/bp.go b/pkg/app/bp.go index 6392f1a551..64242ceb9d 100644 --- a/pkg/app/bp.go +++ b/pkg/app/bp.go @@ -80,8 +80,8 @@ func updateImageTags(bp *crv1alpha1.Blueprint) { continue } - // ghcr.io/kanisterio/tools:v0.xx.x => ghcr.io/kanisterio/tools:latest - phase.Args["image"] = fmt.Sprintf("%s:latest", strings.Split(imageStr, ":")[0]) + // ghcr.io/kanisterio/tools:v0.xx.x => ghcr.io/kanisterio/tools:v9.99.9-dev + phase.Args["image"] = fmt.Sprintf("%s:v9.99.9-dev", strings.Split(imageStr, ":")[0]) // Change imagePullPolicy to Always using podOverride config phase.Args["podOverride"] = crv1alpha1.JSONMap{ diff --git a/pkg/app/bp_test.go b/pkg/app/bp_test.go index d36f669544..fa2d3201e8 100644 --- a/pkg/app/bp_test.go +++ b/pkg/app/bp_test.go @@ -153,9 +153,9 @@ func validateImageTags(c *C, bp *crv1alpha1.Blueprint) { if !ok { continue } - // Verify if the tag is "latest" + // Verify if the tag is "v9.99.9-dev" c.Log(fmt.Sprintf("phase:%s, image:%s", phase.Name, image.(string))) - c.Assert(strings.Split(image.(string), ":")[1], Equals, "latest") + c.Assert(strings.Split(image.(string), ":")[1], Equals, "v9.99.9-dev") c.Assert(phase.Args["podOverride"], DeepEquals, podOverride) } } diff --git a/pkg/app/cassandra.go b/pkg/app/cassandra.go index a147510722..81b4060c24 100644 --- a/pkg/app/cassandra.go +++ b/pkg/app/cassandra.go @@ -58,7 +58,7 @@ func NewCassandraInstance(name string) App { Values: map[string]string{ "image.registry": "ghcr.io", "image.repository": "kanisterio/cassandra", - "image.tag": "latest", + "image.tag": "v9.99.9-dev", "image.pullPolicy": "Always", "cluster.replicaCount": "1", }, diff --git a/pkg/app/mongodb.go b/pkg/app/mongodb.go index f9c3dea8cb..ff75ecce05 100644 --- a/pkg/app/mongodb.go +++ b/pkg/app/mongodb.go @@ -63,7 +63,7 @@ func NewMongoDB(name string) App { "architecture": "replicaset", "image.registry": "ghcr.io", "image.repository": "kanisterio/mongodb", - "image.tag": "latest", + "image.tag": "v9.99.9-dev", "image.pullPolicy": "Always", }, }, diff --git a/pkg/app/postgresql.go b/pkg/app/postgresql.go index ba09dffdb5..0614734498 100644 --- a/pkg/app/postgresql.go +++ b/pkg/app/postgresql.go @@ -52,7 +52,7 @@ func NewPostgresDB(name string, subPath string) App { Values: map[string]string{ "image.registry": "ghcr.io", "image.repository": "kanisterio/postgresql", - "image.tag": "latest", + "image.tag": "v9.99.9-dev", "image.pullPolicy": "Always", "postgresqlPassword": "test@54321", "postgresqlExtendedConf.archiveCommand": "envdir /bitnami/postgresql/data/env wal-e wal-push %p", diff --git a/pkg/kube/pod_test.go b/pkg/kube/pod_test.go index 078fbc79b8..6017510132 100644 --- a/pkg/kube/pod_test.go +++ b/pkg/kube/pod_test.go @@ -44,7 +44,7 @@ type PodSuite struct { const ( testSAName = "test-sa" controllerSA = "controller-sa" - kanisterToolsImage = "ghcr.io/kanisterio/kanister-tools:latest" + kanisterToolsImage = "ghcr.io/kanisterio/kanister-tools:v9.99.9-dev" ) var _ = Suite(&PodSuite{}) @@ -268,7 +268,7 @@ func (s *PodSuite) TestPodWithVolumes(c *C) { pod, err := CreatePod(ctx, cli, &PodOptions{ Namespace: s.namespace, GenerateName: "test-", - Image: "ghcr.io/kanisterio/kanister-tools:latest", + Image: "ghcr.io/kanisterio/kanister-tools:v9.99.9-dev", Command: []string{"sh", "-c", "tail -f /dev/null"}, Volumes: vols, }) diff --git a/pkg/testutil/testutil.go b/pkg/testutil/testutil.go index f6fb20e01d..1d86f64814 100644 --- a/pkg/testutil/testutil.go +++ b/pkg/testutil/testutil.go @@ -98,7 +98,7 @@ func newTestPodTemplateSpec() v1.PodTemplateSpec { Containers: []v1.Container{ v1.Container{ Name: "test-container", - Image: "ghcr.io/kanisterio/kanister-tools:latest", + Image: "ghcr.io/kanisterio/kanister-tools:v9.99.9-dev", Command: []string{"tail"}, Args: []string{"-f", "/dev/null"}, },