From dcdd510d75802e179d0d9324f98d97fcb99c5da5 Mon Sep 17 00:00:00 2001 From: Sait Talha Nisanci Date: Mon, 20 Apr 2020 12:24:40 +0300 Subject: [PATCH] not run other tests with hammerdb jobs --- .circleci/config.yml | 145 ++++++++++++++++++++++-------- src/test/hammerdb/run_hammerdb.sh | 14 ++- 2 files changed, 116 insertions(+), 43 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2655669b8..2d89d1ac7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -235,7 +235,7 @@ jobs: ch_benchmark: docker: - image: buildpack-deps:stretch - working_directory: /home/circleci/project + working_directory: /home/circleci/project steps: - checkout - azure-cli/install @@ -245,11 +245,11 @@ jobs: cd ./src/test/hammerdb sh run_hammerdb.sh citusbot_ch_benchmark_rg name: install dependencies and run ch_benchmark tests - no_output_timeout: 20m + no_output_timeout: 20m tpcc_benchmark: docker: - image: buildpack-deps:stretch - working_directory: /home/circleci/project + working_directory: /home/circleci/project steps: - checkout - azure-cli/install @@ -259,11 +259,11 @@ jobs: cd ./src/test/hammerdb sh run_hammerdb.sh citusbot_tpcc_benchmark_rg name: install dependencies and run ch_benchmark tests - no_output_timeout: 20m + no_output_timeout: 20m orbs: codecov: codecov/codecov@1.0.5 - azure-cli: circleci/azure-cli@1.0.0 + azure-cli: circleci/azure-cli@1.0.0 workflows: version: 2 @@ -279,39 +279,114 @@ workflows: filters: branches: only: - - /tpcc_benchmark\/.*/ # match with tpcc_benchmark/ prefix + - /tpcc_benchmark\/.*/ # match with tpcc_benchmark/ prefix - # build_and_test: - # jobs: - # - build - # - check-style - # - check-sql-snapshots + build_and_test: + jobs: + - build: + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - check-style: + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - check-sql-snapshots: + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ - # - test-11_check-multi: - # requires: [build] - # - test-11_check-tt-van-mx: - # requires: [build] - # - test-11_check-iso-work-fol: - # requires: [build] - # - test-11_check-fol: - # requires: [build] - # - test-11_check-failure: - # requires: [build] + - test-11_check-multi: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-11_check-tt-van-mx: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-11_check-iso-work-fol: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-11_check-fol: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-11_check-failure: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ - # - test-12_check-multi: - # requires: [build] - # - test-12_check-tt-van-mx: - # requires: [build] - # - test-12_check-iso-work-fol: - # requires: [build] - # - test-12_check-fol: - # requires: [build] - # - test-12_check-failure: - # requires: [build] + - test-12_check-multi: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-12_check-tt-van-mx: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-12_check-iso-work-fol: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-12_check-fol: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ + - test-12_check-failure: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ - # - test-11-12_check-pg-upgrade: - # requires: [build] + - test-11-12_check-pg-upgrade: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ - # - test-11_check-citus-upgrade: - # requires: [build] + - test-11_check-citus-upgrade: + requires: [build] + filters: + branches: + ignore: + - /tpcc_benchmark\/.*/ # ignore tpcc_benchmark/ + - /ch_benchmark\/.*/ # ignore ch_benchmark/ diff --git a/src/test/hammerdb/run_hammerdb.sh b/src/test/hammerdb/run_hammerdb.sh index 28ff052ca..edaab3607 100644 --- a/src/test/hammerdb/run_hammerdb.sh +++ b/src/test/hammerdb/run_hammerdb.sh @@ -21,7 +21,7 @@ set +x git config --global credential.helper store #TODO:: after hammerdbChanges is merged, use master. git clone -b hammerdbChanges https://${GIT_USERNAME}:${GIT_TOKEN}@github.com/citusdata/test-automation -set -x +set -x cd test-automation @@ -41,10 +41,8 @@ branch_config=current_branch.ini # create a config for this branch cp master.ini "${branch_config}" -# escape / in branch name otherwise sed won't work. -BRANCH_ESCAPED=$(echo "$BRANCH" | sed 's/[\/\.]/\\&/g') # put the branch name to the config file. -sed -i "s/master/${BRANCH_ESCAPED}/g" "${branch_config}" +sed -i "s@master@${BRANCH}@g" "${branch_config}" cd "${test_automation_dir}" cd ./hammerdb @@ -53,8 +51,8 @@ cd ./hammerdb sed -i "s/pg_duration 200/pg_duration 10/g" run.tcl -git config --global user.email "citus-bot@microsoft.com" -git config --global user.name "citus bot" +git config --global user.email "citus-bot@microsoft.com" +git config --global user.name "citus bot" git add -A git commit -m "test hammerdb: ${rg} vs master" git push origin "${new_branch_name}" @@ -65,12 +63,12 @@ cd ./hammerdb if [ "$rg" = "citusbot_ch_benchmark_rg" ]; then export IS_CH=true export IS_TPCC=true -fi +fi if [ "$rg" = "citusbot_tpcc_benchmark_rg" ]; then export IS_CH=false export IS_TPCC=true -fi +fi # create cluster and run the hammerd benchmark ./create-run.sh