Skip to content

Commit a529c1e

Browse files
[add] Triggering nightly CI benchmarks; Early return on CI benchmarks for forked PRs (#1579)
1 parent fe2e7ce commit a529c1e

File tree

1 file changed

+48
-24
lines changed

1 file changed

+48
-24
lines changed

.circleci/config.yml

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,35 @@ commands:
7676
command: |
7777
locale-gen --purge en_US.UTF-8
7878
dpkg-reconfigure -f noninteractive locales
79+
80+
benchmark-automation:
81+
steps:
82+
- run:
83+
name: Install remote benchmark tool dependencies
84+
command: TF_EXE_FILE_NAME=/workspace/terraform ./tests/benchmarks/remote/install_deps.sh
85+
- run:
86+
name: Install remote benchmark python dependencies
87+
command: python3 -m pip install -r ./tests/benchmarks/requirements.txt
88+
- run:
89+
name: Run CI benchmarks on aws
90+
command: |
91+
cd ./tests/benchmarks
92+
export AWS_ACCESS_KEY_ID=$PERFORMANCE_EC2_ACCESS_KEY
93+
export AWS_SECRET_ACCESS_KEY=$PERFORMANCE_EC2_SECRET_KEY
94+
export AWS_DEFAULT_REGION=$PERFORMANCE_EC2_REGION
95+
export EC2_PRIVATE_PEM=$PERFORMANCE_EC2_PRIVATE_PEM
96+
97+
python3 remote-runner.py \
98+
--terraform_bin_path /workspace/terraform \
99+
--module_path /workspace/$MODULE_ARTIFACT \
100+
--github_actor $CIRCLE_USERNAME \
101+
--github_repo $CIRCLE_PROJECT_REPONAME \
102+
--github_org $CIRCLE_PROJECT_USERNAME \
103+
--github_sha $CIRCLE_SHA1 \
104+
--github_branch $CIRCLE_BRANCH \
105+
--upload_results_s3 \
106+
--triggering_env circleci \
107+
--push_results_redistimeseries
79108
80109
jobs:
81110
build:
@@ -248,35 +277,29 @@ jobs:
248277
docker:
249278
- image: 'redisfab/rmbuilder:6.0.9-x64-bionic'
250279
steps:
280+
- early_return_for_forked_pull_requests
251281
- checkout
252282
- attach_workspace:
253283
at: /workspace
284+
- benchmark-automation
285+
286+
nightly_performance_automation:
287+
docker:
288+
- image: 'redisfab/rmbuilder:6.0.9-x64-bionic'
289+
steps:
290+
- early_return_for_forked_pull_requests
291+
- checkout
292+
- setup-prerequisits
293+
- setup-automation
294+
- attach_workspace:
295+
at: /workspace
296+
- load-cached-deps
297+
254298
- run:
255-
name: Install remote benchmark tool dependencies
256-
command: TF_EXE_FILE_NAME=/workspace/terraform ./tests/benchmarks/remote/install_deps.sh
257-
- run:
258-
name: Install remote benchmark python dependencies
259-
command: python3 -m pip install -r ./tests/benchmarks/requirements.txt
260-
- run:
261-
name: Run CI benchmarks on aws
262-
command: |
263-
cd ./tests/benchmarks
264-
export AWS_ACCESS_KEY_ID=$PERFORMANCE_EC2_ACCESS_KEY
265-
export AWS_SECRET_ACCESS_KEY=$PERFORMANCE_EC2_SECRET_KEY
266-
export AWS_DEFAULT_REGION=$PERFORMANCE_EC2_REGION
267-
export EC2_PRIVATE_PEM=$PERFORMANCE_EC2_PRIVATE_PEM
299+
name: Build artifact
300+
command: make
268301

269-
python3 remote-runner.py \
270-
--terraform_bin_path /workspace/terraform \
271-
--module_path /workspace/$MODULE_ARTIFACT \
272-
--github_actor $CIRCLE_USERNAME \
273-
--github_repo $CIRCLE_PROJECT_REPONAME \
274-
--github_org $CIRCLE_PROJECT_USERNAME \
275-
--github_sha $CIRCLE_SHA1 \
276-
--github_branch $CIRCLE_BRANCH \
277-
--upload_results_s3 \
278-
--triggering_env circleci \
279-
--push_results_redistimeseries
302+
- benchmark-automation
280303

281304

282305

@@ -361,3 +384,4 @@ workflows:
361384
<<: *on-master
362385
jobs:
363386
- nightly_automation
387+
- nightly_performance_automation

0 commit comments

Comments
 (0)