Merge pull request #11929 from spowelljr/fixTimeToK8s

Update creating PR for time-to-k8s
pull/11931/head
Medya Ghazizadeh 2021-07-07 21:06:45 -04:00 committed by GitHub
commit 6916cc75aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 16 deletions

View File

@ -18,4 +18,18 @@ jobs:
stable: true
- name: Benchmark
run: |
./hack/benchmark/time-to-k8s/time-to-k8s.sh ${{ secrets.MINIKUBE_BOT_PAT }}
./hack/benchmark/time-to-k8s/time-to-k8s.sh
echo "::set-output name=version::$(minikube version --short)"
- name: Create PR
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.MINIKUBE_BOT_PAT }}
commit-message: add time-to-k8s benchmark for ${{ steps.gendocs.outputs.version }}
committer: minikube-bot <minikube-bot@google.com>
author: minikube-bot <minikube-bot@google.com>
branch: addTimeToK8s${{ steps.gendocs.outputs.version }}
push-to-fork: minikube-bot/minikube
base: master
delete-branch: true
title: Add time-to-k8s benchmark for ${{ steps.gendocs.outputs.version }}
body: Updating time-to-k8s benchmark as part of the release process

View File

@ -31,13 +31,6 @@ install_minikube() {
sudo install ./out/minikube /usr/local/bin/minikube
}
install_gh() {
export access_token="$1"
# Make sure gh is installed and configured
./hack/jenkins/installers/check_install_gh.sh
}
config_git() {
git config user.name "minikube-bot"
git config user.email "minikube-bot@google.com"
@ -67,16 +60,9 @@ commit_changes() {
git commit -m "add time-to-k8s benchmark for $1"
}
create_pr() {
git remote add minikube-bot https://minikube-bot:"$2"@github.com/minikube-bot/minikube.git
git push -u minikube-bot addTimeToK8s"$1"
gh pr create --repo kubernetes/minikube --base master --title "Add time-to-k8s benchmark for $1" --body "Updating time-to-k8s benchmark as part of the release process"
}
install_kind
install_k3d
install_minikube
install_gh "$1"
config_git
VERSION=$(minikube version --short)
@ -85,4 +71,3 @@ run_benchmark
generate_chart "$VERSION"
create_page "$VERSION"
commit_changes "$VERSION"
create_pr "$VERSION" "$1"