From eb73047de52006b162036f9b49524994dedb9a61 Mon Sep 17 00:00:00 2001 From: gongmax Date: Wed, 25 Oct 2023 21:27:30 +0000 Subject: [PATCH 1/4] Build and push image before performance tests --- ci/perf-test-cloudbuild.yaml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/ci/perf-test-cloudbuild.yaml b/ci/perf-test-cloudbuild.yaml index 011660fc6c..38793f7ed3 100644 --- a/ci/perf-test-cloudbuild.yaml +++ b/ci/perf-test-cloudbuild.yaml @@ -40,11 +40,32 @@ steps: env: ['REGISTRY=${_REGISTRY}', 'CUSTOM_LOCAL_TAG=performance-test'] args: [pull-build-image-with-tag] + # + # Build all the images and sdks, and push them up to the repository + # + + - name: "make-docker" + id: build-images + waitFor: + - pull-build-image + dir: "build" + env: + - "REGISTRY=${_REGISTRY}" + args: [ "-j", "4", "build-images"] + - name: "make-docker" + id: push-images + waitFor: + - build-images + dir: "build" + env: + - "REGISTRY=${_REGISTRY}" + args: [ "-j", "4", "push"] + # # Run the performance tests with default feature gates setting # - name: performance-test - dir: build + dir: push-images args: - ./performance-test.sh - ${_TEST_CLUSTER_NAME} From ad46ae112da89e9f7a9576fd144c6f5ed1c27607 Mon Sep 17 00:00:00 2001 From: gongmax Date: Wed, 25 Oct 2023 22:23:43 +0000 Subject: [PATCH 2/4] fix --- ci/perf-test-cloudbuild.yaml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/ci/perf-test-cloudbuild.yaml b/ci/perf-test-cloudbuild.yaml index 38793f7ed3..60721915e3 100644 --- a/ci/perf-test-cloudbuild.yaml +++ b/ci/perf-test-cloudbuild.yaml @@ -35,10 +35,23 @@ steps: # pull the main build image if it exists # - name: make-docker - id: pull-build-image + id: pull-build-image-with-tag dir: build env: ['REGISTRY=${_REGISTRY}', 'CUSTOM_LOCAL_TAG=performance-test'] args: [pull-build-image-with-tag] + waitFor: + - build-make-docker + + # + # pull the main build image if it exists + # + - name: make-docker + id: pull-build-image + dir: build + env: ['REGISTRY=${_REGISTRY}'] + args: [pull-build-image] + waitFor: + - build-make-docker # # Build all the images and sdks, and push them up to the repository @@ -51,7 +64,7 @@ steps: dir: "build" env: - "REGISTRY=${_REGISTRY}" - args: [ "-j", "4", "build-images"] + args: ["-j", "4", "build-images"] - name: "make-docker" id: push-images waitFor: @@ -59,13 +72,12 @@ steps: dir: "build" env: - "REGISTRY=${_REGISTRY}" - args: [ "-j", "4", "push"] + args: ["-j", "4", "push"] # # Run the performance tests with default feature gates setting # - name: performance-test - dir: push-images args: - ./performance-test.sh - ${_TEST_CLUSTER_NAME} @@ -81,7 +93,8 @@ steps: - ${_TEST_INTERVAL} id: performance-test waitFor: - - pull-build-image + - pull-build-image-with-tag + - push-images substitutions: _TEST_CLUSTER_NAME: standard-performance-test-cluster-1-27 From ea4b5acda4857926b6da1ac8739b3e373569227a Mon Sep 17 00:00:00 2001 From: gongmax Date: Wed, 25 Oct 2023 22:40:32 +0000 Subject: [PATCH 3/4] fix --- ci/perf-test-cloudbuild.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/perf-test-cloudbuild.yaml b/ci/perf-test-cloudbuild.yaml index 60721915e3..41d0bbfb03 100644 --- a/ci/perf-test-cloudbuild.yaml +++ b/ci/perf-test-cloudbuild.yaml @@ -78,6 +78,7 @@ steps: # Run the performance tests with default feature gates setting # - name: performance-test + dir: build args: - ./performance-test.sh - ${_TEST_CLUSTER_NAME} From 6c093fe3f7509ba98f82b13be6b250fff70a6655 Mon Sep 17 00:00:00 2001 From: gongmax Date: Wed, 25 Oct 2023 23:50:45 +0000 Subject: [PATCH 4/4] fix --- build/includes/build-image.mk | 4 ++-- ci/perf-test-cloudbuild.yaml | 19 +++++++++---------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/build/includes/build-image.mk b/build/includes/build-image.mk index d33238a983..290724dcb2 100644 --- a/build/includes/build-image.mk +++ b/build/includes/build-image.mk @@ -51,8 +51,8 @@ endif pull-build-image: $(MAKE) pull-remote-build-image REMOTE_TAG=$(build_remote_tag) LOCAL_TAG=$(build_tag) -pull-build-image-with-tag: - $(MAKE) pull-remote-build-image REMOTE_TAG=$(build_remote_tag) LOCAL_TAG=$(CUSTOM_LOCAL_TAG) +tag-build-image: + docker tag $(build_tag) $(CUSTOM_LOCAL_TAG) # push the local build image up to your repository push-build-image: diff --git a/ci/perf-test-cloudbuild.yaml b/ci/perf-test-cloudbuild.yaml index 41d0bbfb03..a84d44dfdd 100644 --- a/ci/perf-test-cloudbuild.yaml +++ b/ci/perf-test-cloudbuild.yaml @@ -35,23 +35,23 @@ steps: # pull the main build image if it exists # - name: make-docker - id: pull-build-image-with-tag + id: pull-build-image dir: build - env: ['REGISTRY=${_REGISTRY}', 'CUSTOM_LOCAL_TAG=performance-test'] - args: [pull-build-image-with-tag] + env: ['REGISTRY=${_REGISTRY}'] + args: [pull-build-image] waitFor: - build-make-docker # - # pull the main build image if it exists + # add tag to build image # - name: make-docker - id: pull-build-image + id: tag-build-image dir: build - env: ['REGISTRY=${_REGISTRY}'] - args: [pull-build-image] + env: ['CUSTOM_LOCAL_TAG=performance-test'] + args: [tag-build-image] waitFor: - - build-make-docker + - pull-build-image # # Build all the images and sdks, and push them up to the repository @@ -94,8 +94,7 @@ steps: - ${_TEST_INTERVAL} id: performance-test waitFor: - - pull-build-image-with-tag - - push-images + - tag-build-image substitutions: _TEST_CLUSTER_NAME: standard-performance-test-cluster-1-27