From 93ae56c5d5d3c6309f3679f649ba0a9d81a1ce38 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 17 Aug 2022 17:42:01 +0200 Subject: [PATCH 1/3] [ci] Weights PR for master and client on cumulus --- .gitlab-ci.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e11e2814a81..b0ca87ca90b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -326,9 +326,20 @@ benchmarks-statemint: - ./scripts/benchmarks-ci.sh assets westmint ./artifacts - export BRANCHNAME="weights-statemint-${CI_COMMIT_BRANCH}" - *git-commit-push + # create PR to ${CI_COMMIT_BRANCH} + - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} + -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'${BRANCHNAME}'","base":"'${CI_COMMIT_BRANCH}'"}' + -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls + # create PR to master + - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} + -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'${BRANCHNAME}'","base":"master"}' + -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls + # create PR to a branch with version number (e.g. v0.9.270) + # transform release-parachains-v9270 to v0.9.270 + - export BASEBRANCH=$(echo ${CI_COMMIT_BRANCH} | cut -d "-" -f 3 | sed -e "s/\(.\)\(.\)\(...\)/\10.\2.\3/") # create PR - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} - -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'$BRANCHNAME'","base":"'${CI_COMMIT_BRANCH}'"}' + -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'${BRANCHNAME}'","base":"'${BASEBRANCH}'"}' -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls after_script: - rm -rf .git/config From 159eca1e4236c7c825e1d88c421fd0de4f170526 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Wed, 17 Aug 2022 18:17:35 +0200 Subject: [PATCH 2/3] add 4th pr creation to benchmarks-statemint --- .gitlab-ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b0ca87ca90b..ce854bd8f95 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -326,7 +326,7 @@ benchmarks-statemint: - ./scripts/benchmarks-ci.sh assets westmint ./artifacts - export BRANCHNAME="weights-statemint-${CI_COMMIT_BRANCH}" - *git-commit-push - # create PR to ${CI_COMMIT_BRANCH} + # create PR to release-parachains-v* branch - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'${BRANCHNAME}'","base":"'${CI_COMMIT_BRANCH}'"}' -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls @@ -334,13 +334,17 @@ benchmarks-statemint: - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'${BRANCHNAME}'","base":"master"}' -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls - # create PR to a branch with version number (e.g. v0.9.270) + # create PR to a branch with version number (e.g. v0.9.270) and release-v* (e.g. release-v0.9.270) # transform release-parachains-v9270 to v0.9.270 - export BASEBRANCH=$(echo ${CI_COMMIT_BRANCH} | cut -d "-" -f 3 | sed -e "s/\(.\)\(.\)\(...\)/\10.\2.\3/") - # create PR + # create PR to v* branch - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'${BRANCHNAME}'","base":"'${BASEBRANCH}'"}' -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls + # create PR to release-v* branch + - curl -u ${GITHUB_USER}:${GITHUB_TOKEN} + -d '{"title":"[benchmarks] Update weights for statemine/t","body":"This PR is generated automatically by CI.","head":"'${BRANCHNAME}'","base":"'release-${BASEBRANCH}'"}' + -X POST https://api.github.com/repos/paritytech/${CI_PROJECT_NAME}/pulls after_script: - rm -rf .git/config tags: From baf175ef8e9037d349676f7ff0b5897480d234a0 Mon Sep 17 00:00:00 2001 From: alvicsam Date: Fri, 19 Aug 2022 11:48:26 +0200 Subject: [PATCH 3/3] rename benchmarks-statemint to benchmarks-assets --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ce854bd8f95..4767fdbc549 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -313,7 +313,7 @@ benchmarks-build: - git commit -m "[benchmarks] pr with weights" - git push origin $BRANCHNAME -benchmarks-statemint: +benchmarks-assets: stage: benchmarks-run before_script: - *rust-info-script @@ -370,13 +370,13 @@ benchmarks-collectives: tags: - weights -publish-benchmarks-statemint-s3: &publish-benchmarks +publish-benchmarks-assets-s3: &publish-benchmarks stage: publish <<: *kubernetes-env image: paritytech/awscli:latest <<: *benchmarks-refs needs: - - job: benchmarks-statemint + - job: benchmarks-assets artifacts: true variables: GIT_STRATEGY: none