11# The short Git commit hash
22SHORT_COMMIT := $(shell git rev-parse --short HEAD)
3+ BRANCH_NAME: =$(shell git rev-parse --abbrev-ref HEAD | tr '/' '-')
34# The Git commit hash
45COMMIT := $(shell git rev-parse HEAD)
56# The tag of the current commit, otherwise empty
@@ -9,6 +10,9 @@ VERSION := $(shell git describe --tags --abbrev=2 --match "v*" --match "secure-c
910# dynamically split up CI jobs into smaller jobs that can be run in parallel
1011GO_TEST_PACKAGES := ./...
1112
13+ FLOW_GO_TAG := v0.28.15
14+
15+
1216# Image tag: if image tag is not set, set it with version (or short commit if empty)
1317ifeq (${IMAGE_TAG},)
1418IMAGE_TAG := ${VERSION}
@@ -33,6 +37,7 @@ GOARCH := $(shell go env GOARCH)
3337# The location of the k8s YAML files
3438K8S_YAMLS_LOCATION_STAGING =./k8s/staging
3539
40+
3641# docker container registry
3742export CONTAINER_REGISTRY := gcr.io/flow-container-registry
3843export DOCKER_BUILDKIT := 1
@@ -156,6 +161,7 @@ generate-mocks: install-mock-generators
156161 mockery --name ' .*' --dir=engine/execution/computation/computer --case=underscore --output=" ./engine/execution/computation/computer/mock" --outpkg=" mock"
157162 mockery --name ' .*' --dir=engine/execution/state --case=underscore --output=" ./engine/execution/state/mock" --outpkg=" mock"
158163 mockery --name ' .*' --dir=engine/collection --case=underscore --output=" ./engine/collection/mock" --outpkg=" mock"
164+ mockery --name ' complianceCore' --dir=engine/common/follower --exported --case=underscore --output=" ./engine/common/follower/mock" --outpkg=" mock"
159165 mockery --name ' .*' --dir=engine/common/follower/cache --case=underscore --output=" ./engine/common/follower/cache/mock" --outpkg=" mock"
160166 mockery --name ' .*' --dir=engine/consensus --case=underscore --output=" ./engine/consensus/mock" --outpkg=" mock"
161167 mockery --name ' .*' --dir=engine/consensus/approvals --case=underscore --output=" ./engine/consensus/approvals/mock" --outpkg=" mock"
@@ -248,12 +254,12 @@ docker-ci-integration:
248254docker-build-collection :
249255 docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/collection --build-arg COMMIT=$(COMMIT ) --build-arg VERSION=$(IMAGE_TAG ) --build-arg GOARCH=$(GOARCH ) --target production \
250256 --label " git_commit=${COMMIT} " --label " git_tag=${IMAGE_TAG} " \
251- -t " $( CONTAINER_REGISTRY) /collection:latest" -t " $( CONTAINER_REGISTRY) /collection:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /collection:$( IMAGE_TAG) " .
257+ -t " $( CONTAINER_REGISTRY) /collection:latest" -t " $( CONTAINER_REGISTRY) /collection:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /collection:$( IMAGE_TAG) " -t " $( CONTAINER_REGISTRY ) /collection: $( FLOW_GO_TAG ) " .
252258
253259.PHONY : docker-build-collection-without-netgo
254260docker-build-collection-without-netgo :
255261 docker build -f cmd/Dockerfile --build-arg TAGS=relic --build-arg TARGET=./cmd/collection --build-arg COMMIT=$(COMMIT ) --build-arg VERSION=$(IMAGE_TAG_NO_NETGO ) --build-arg GOARCH=$(GOARCH ) --target production \
256- --label " git_commit=${COMMIT} " --label " git_tag=$( IMAGE_TAG_NO_NETGO) " -t " $( CONTAINER_REGISTRY) /collection:$( IMAGE_TAG_NO_NETGO) " .
262+ --label " git_commit=${COMMIT} " --label " git_tag=$( IMAGE_TAG_NO_NETGO) " -t " $( CONTAINER_REGISTRY) /collection:$( IMAGE_TAG_NO_NETGO) " .
257263
258264.PHONY : docker-build-collection-debug
259265docker-build-collection-debug :
@@ -264,7 +270,7 @@ docker-build-collection-debug:
264270docker-build-consensus :
265271 docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/consensus --build-arg COMMIT=$(COMMIT ) --build-arg VERSION=$(IMAGE_TAG ) --build-arg GOARCH=$(GOARCH ) --target production \
266272 --label " git_commit=${COMMIT} " --label " git_tag=${IMAGE_TAG} " \
267- -t " $( CONTAINER_REGISTRY) /consensus:latest" -t " $( CONTAINER_REGISTRY) /consensus:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /consensus:$( IMAGE_TAG) " .
273+ -t " $( CONTAINER_REGISTRY) /consensus:latest" -t " $( CONTAINER_REGISTRY) /consensus:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /consensus:$( IMAGE_TAG) " -t " $( CONTAINER_REGISTRY ) /consensus: $( FLOW_GO_TAG ) " .
268274
269275.PHONY : docker-build-consensus-without-netgo
270276docker-build-consensus-without-netgo :
@@ -280,7 +286,7 @@ docker-build-consensus-debug:
280286docker-build-execution :
281287 docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/execution --build-arg COMMIT=$(COMMIT ) --build-arg VERSION=$(IMAGE_TAG ) --build-arg GOARCH=$(GOARCH ) --target production \
282288 --label " git_commit=${COMMIT} " --label " git_tag=${IMAGE_TAG} " \
283- -t " $( CONTAINER_REGISTRY) /execution:latest" -t " $( CONTAINER_REGISTRY) /execution:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /execution:$( IMAGE_TAG) " .
289+ -t " $( CONTAINER_REGISTRY) /execution:latest" -t " $( CONTAINER_REGISTRY) /execution:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /execution:$( IMAGE_TAG) " -t " $( CONTAINER_REGISTRY ) /execution: $( FLOW_GO_TAG ) " .
284290
285291.PHONY : docker-build-execution-without-netgo
286292docker-build-execution-without-netgo :
@@ -306,7 +312,7 @@ docker-build-execution-corrupt:
306312docker-build-verification :
307313 docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/verification --build-arg COMMIT=$(COMMIT ) --build-arg VERSION=$(IMAGE_TAG ) --build-arg GOARCH=$(GOARCH ) --target production \
308314 --label " git_commit=${COMMIT} " --label " git_tag=${IMAGE_TAG} " \
309- -t " $( CONTAINER_REGISTRY) /verification:latest" -t " $( CONTAINER_REGISTRY) /verification:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /verification:$( IMAGE_TAG) " .
315+ -t " $( CONTAINER_REGISTRY) /verification:latest" -t " $( CONTAINER_REGISTRY) /verification:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /verification:$( IMAGE_TAG) " -t " $( CONTAINER_REGISTRY ) /verification: $( FLOW_GO_TAG ) " .
310316
311317.PHONY : docker-build-verification-without-netgo
312318docker-build-verification-without-netgo :
@@ -332,7 +338,7 @@ docker-build-verification-corrupt:
332338docker-build-access :
333339 docker build -f cmd/Dockerfile --build-arg TARGET=./cmd/access --build-arg COMMIT=$(COMMIT ) --build-arg VERSION=$(IMAGE_TAG ) --build-arg GOARCH=$(GOARCH ) --target production \
334340 --label " git_commit=${COMMIT} " --label " git_tag=${IMAGE_TAG} " \
335- -t " $( CONTAINER_REGISTRY) /access:latest" -t " $( CONTAINER_REGISTRY) /access:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /access:$( IMAGE_TAG) " .
341+ -t " $( CONTAINER_REGISTRY) /access:latest" -t " $( CONTAINER_REGISTRY) /access:$( SHORT_COMMIT) " -t " $( CONTAINER_REGISTRY) /access:$( IMAGE_TAG) " -t " $( CONTAINER_REGISTRY ) /access: $( FLOW_GO_TAG ) " .
336342
337343.PHONY : docker-build-access-without-netgo
338344docker-build-access-without-netgo :
@@ -419,6 +425,7 @@ docker-build-benchnet: docker-build-flow docker-build-loader
419425docker-push-collection :
420426 docker push " $( CONTAINER_REGISTRY) /collection:$( SHORT_COMMIT) "
421427 docker push " $( CONTAINER_REGISTRY) /collection:$( IMAGE_TAG) "
428+ docker push " $( CONTAINER_REGISTRY) /collection:$( FLOW_GO_TAG) "
422429
423430.PHONY : docker-push-collection-without-netgo
424431docker-push-collection-without-netgo :
@@ -432,6 +439,7 @@ docker-push-collection-latest: docker-push-collection
432439docker-push-consensus :
433440 docker push " $( CONTAINER_REGISTRY) /consensus:$( SHORT_COMMIT) "
434441 docker push " $( CONTAINER_REGISTRY) /consensus:$( IMAGE_TAG) "
442+ docker push " $( CONTAINER_REGISTRY) /consensus:$( FLOW_GO_TAG) "
435443
436444.PHONY : docker-push-consensus-without-netgo
437445docker-push-consensus-without-netgo :
@@ -445,6 +453,13 @@ docker-push-consensus-latest: docker-push-consensus
445453docker-push-execution :
446454 docker push " $( CONTAINER_REGISTRY) /execution:$( SHORT_COMMIT) "
447455 docker push " $( CONTAINER_REGISTRY) /execution:$( IMAGE_TAG) "
456+ docker push " $( CONTAINER_REGISTRY) /execution:$( FLOW_GO_TAG) "
457+
458+ .PHONY : docker-push-execution-corrupt
459+ docker-push-execution-corrupt :
460+ docker push " $( CONTAINER_REGISTRY) /execution-corrupted:$( SHORT_COMMIT) "
461+ docker push " $( CONTAINER_REGISTRY) /execution-corrupted:$( IMAGE_TAG) "
462+
448463
449464.PHONY : docker-push-execution-without-netgo
450465docker-push-execution-without-netgo :
@@ -458,6 +473,12 @@ docker-push-execution-latest: docker-push-execution
458473docker-push-verification :
459474 docker push " $( CONTAINER_REGISTRY) /verification:$( SHORT_COMMIT) "
460475 docker push " $( CONTAINER_REGISTRY) /verification:$( IMAGE_TAG) "
476+ docker push " $( CONTAINER_REGISTRY) /verification:$( FLOW_GO_TAG) "
477+
478+ .PHONY : docker-push-verification-corrupt
479+ docker-push-verification-corrupt :
480+ docker push " $( CONTAINER_REGISTRY) /verification-corrupted:$( SHORT_COMMIT) "
481+ docker push " $( CONTAINER_REGISTRY) /verification-corrupted:$( IMAGE_TAG) "
461482
462483.PHONY : docker-push-verification-without-netgo
463484docker-push-verification-without-netgo :
@@ -471,6 +492,12 @@ docker-push-verification-latest: docker-push-verification
471492docker-push-access :
472493 docker push " $( CONTAINER_REGISTRY) /access:$( SHORT_COMMIT) "
473494 docker push " $( CONTAINER_REGISTRY) /access:$( IMAGE_TAG) "
495+ docker push " $( CONTAINER_REGISTRY) /access:$( FLOW_GO_TAG) "
496+
497+ .PHONY : docker-push-access-corrupt
498+ docker-push-access-corrupt :
499+ docker push " $( CONTAINER_REGISTRY) /access-corrupted:$( SHORT_COMMIT) "
500+ docker push " $( CONTAINER_REGISTRY) /access-corrupted:$( IMAGE_TAG) "
474501
475502.PHONY : docker-push-access-without-netgo
476503docker-push-access-without-netgo :
@@ -479,6 +506,7 @@ docker-push-access-without-netgo:
479506.PHONY : docker-push-access-latest
480507docker-push-access-latest : docker-push-access
481508 docker push " $( CONTAINER_REGISTRY) /access:latest"
509+
482510
483511.PHONY : docker-push-observer
484512docker-push-observer :
@@ -520,6 +548,9 @@ docker-push-flow-without-netgo: docker-push-collection-without-netgo docker-push
520548.PHONY : docker-push-flow-latest
521549docker-push-flow-latest : docker-push-collection-latest docker-push-consensus-latest docker-push-execution-latest docker-push-verification-latest docker-push-access-latest docker-push-observer-latest
522550
551+ .PHONY : docker-push-flow-corrupt
552+ docker-push-flow-corrupt : docker-push-access-corrupt docker-push-execution-corrupt docker-push-verification-corrupt
553+
523554.PHONY : docker-push-benchnet
524555docker-push-benchnet : docker-push-flow docker-push-loader
525556
@@ -621,4 +652,4 @@ monitor-rollout:
621652 kubectl --kubeconfig=$$ kconfig rollout status statefulsets.apps flow-collection-node-v1; \
622653 kubectl --kubeconfig=$$ kconfig rollout status statefulsets.apps flow-consensus-node-v1; \
623654 kubectl --kubeconfig=$$ kconfig rollout status statefulsets.apps flow-execution-node-v1; \
624- kubectl --kubeconfig=$$ kconfig rollout status statefulsets.apps flow-verification-node-v1
655+ kubectl --kubeconfig=$$ kconfig rollout status statefulsets.apps flow-verification-node-v1
0 commit comments