Skip to content
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

Update Redis version to 7.0.4 #59

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 20 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:
env:
GO_VERSION: 1.17
HELM_VERSION: v3.6.3
REDIS_VERSION: 6.2.7
REDIS_VERSION_6: 6.2.7
REDIS_VERSION_7: 7.0.4
CRD_PATH: charts/operator-for-redis/crds/db.ibm.com_redisclusters.yaml
CRD_DIFF: crd.diff

Expand Down Expand Up @@ -70,17 +71,32 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push cluster node image
- name: Build and push cluster node image Redis v6.2.x
uses: docker/build-push-action@v3
with:
file: Dockerfile.node
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ env.REDIS_VERSION_6 }}-${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
OPERATOR_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
REDIS_VERSION=${{ env.REDIS_VERSION_6 }}


- name: Build and push cluster node image Redis v7.0.x
uses: docker/build-push-action@v3
with:
file: Dockerfile.node
push: true
tags: ${{ env.REDIS_VERSION_7 }}-${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
BUILDTIME=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.created'] }}
OPERATOR_VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
REVISION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.revision'] }}
REDIS_VERSION=${{ env.REDIS_VERSION_7 }}

metrics:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -139,7 +155,7 @@ jobs:
- name: Package node-for-redis chart
env:
OPERATOR_VERSION: ${{ needs.operator.outputs.version }}
run: helm package charts/node-for-redis --version=$OPERATOR_VERSION --app-version=${{ env.REDIS_VERSION }} --destination helm-releases
run: helm package charts/node-for-redis --version=$OPERATOR_VERSION --app-version=${{ env.REDIS_VERSION_6 }}-${{ env.REDIS_VERSION_7 }} --destination helm-releases
4n4nd marked this conversation as resolved.
Show resolved Hide resolved

- name: Push helm charts
env:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.node
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG REDIS_VERSION=6.2.7
ARG REDIS_VERSION=7.0.4
ARG BUILDIMAGE=golang:1.17-bullseye
ARG BASEIMAGE=redis:${REDIS_VERSION}-bullseye
ARG DOCKER_PROXY_REGISTRY
Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ ARTIFACT_INITCONTAINER=init-container

PREFIX=ibmcom/

REDIS_VERSION_6=6.2.7
REDIS_VERSION_7=7.0.4

SOURCES := $(shell find . ! -name "*_test.go" -name '*.go')

CMDBINS := operator node metrics
Expand All @@ -18,7 +21,7 @@ TAG?=$(shell git tag|tail -1)
COMMIT=$(shell git rev-parse HEAD)
DATE=$(shell date +%Y-%m-%d/%H:%M:%S)
BUILDINFOPKG=github.com/IBM/operator-for-redis-cluster/pkg/utils
LDFLAGS= -ldflags "-w -X ${BUILDINFOPKG}.TAG=${TAG} -X ${BUILDINFOPKG}.COMMIT=${COMMIT} -X ${BUILDINFOPKG}.OPERATOR_VERSION=${OPERATOR_VERSION} -X ${BUILDINFOPKG}.REDIS_VERSION=${REDIS_VERSION} -X ${BUILDINFOPKG}.BUILDTIME=${DATE} -s"
LDFLAGS= -ldflags "-w -X ${BUILDINFOPKG}.TAG=${TAG} -X ${BUILDINFOPKG}.COMMIT=${COMMIT} -X ${BUILDINFOPKG}.OPERATOR_VERSION=${OPERATOR_VERSION} -X ${BUILDINFOPKG}.REDIS_VERSION=${REDIS_VERSION_6}-${REDIS_VERSION_7} -X ${BUILDINFOPKG}.BUILDTIME=${DATE} -s"

all: build

Expand All @@ -34,7 +37,12 @@ buildlinux-%: ${SOURCES}
CGO_ENABLED=0 GOOS=linux go build -installsuffix cgo ${LDFLAGS} -o docker/$*/$* ./cmd/$*/main.go

container-%: buildlinux-%
docker build -t $(PREFIX)$*-for-redis:$(TAG) -f Dockerfile.$* .
@if [ "$*" = "node" ]; then\
docker build -t $(PREFIX)$*-for-redis:$(REDIS_VERSION_6)-$(TAG) --build-arg "REDIS_VERSION=$(REDIS_VERSION_6)" -f Dockerfile.$* . ;\
docker build -t $(PREFIX)$*-for-redis:$(REDIS_VERSION_7)-$(TAG) --build-arg "REDIS_VERSION=$(REDIS_VERSION_7)" -f Dockerfile.$* . ;\
else\
docker build -t $(PREFIX)$*-for-redis:$(TAG) -f Dockerfile.$* . ;\
fi

build: $(addprefix build-,$(CMDBINS))

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/golang/glog v1.0.0
github.com/heptiolabs/healthcheck v0.0.0-20211123025425-613501dd5deb
github.com/mediocregopher/radix/v4 v4.1.0
github.com/mediocregopher/radix/v4 v4.1.1
github.com/olekukonko/tablewriter v0.0.5
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.19.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 h1:I0XW9+e1XWDxdcEniV4rQAIOPUGDq67JSCiRCgGCZLI=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/mediocregopher/radix/v4 v4.1.0 h1:z96wBJkyK/hOrAV+qC8AXk0QsbwZEtx5+8ovjnXELuA=
github.com/mediocregopher/radix/v4 v4.1.0/go.mod h1:ajchozX/6ELmydxWeWM6xCFHVpZ4+67LXHOTOVR0nCE=
github.com/mediocregopher/radix/v4 v4.1.1 h1:JkZBEp0y8pWGNZkmO3RR5oEO5huwd4zKKt4rh1C+P8s=
github.com/mediocregopher/radix/v4 v4.1.1/go.mod h1:ajchozX/6ELmydxWeWM6xCFHVpZ4+67LXHOTOVR0nCE=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
Expand Down