diff --git a/hack/jenkins/installers/check_install_gh.sh b/hack/jenkins/installers/check_install_gh.sh index 1353ed601a..c2e8232fdc 100755 --- a/hack/jenkins/installers/check_install_gh.sh +++ b/hack/jenkins/installers/check_install_gh.sh @@ -21,6 +21,7 @@ curl -qLO "https://github.com/cli/cli/releases/download/v1.6.2/gh_1.6.2_linux_am tar -xf gh_1.6.2_linux_amd64.tar.gz && sudo mv gh_1.6.2_linux_amd64/bin/gh /usr/local/bin/gh rm gh_1.6.2_linux_amd64.tar.gz +rm -rf gh_1.6.2_linux_amd64 echo "Authorizing bot with gh" echo "${access_token}" | gh auth login --with-token diff --git a/hack/jenkins/kicbase_auto_build.sh b/hack/jenkins/kicbase_auto_build.sh index 26a54e3e04..655afb241d 100755 --- a/hack/jenkins/kicbase_auto_build.sh +++ b/hack/jenkins/kicbase_auto_build.sh @@ -79,12 +79,12 @@ sha=$(echo ${fullsha} | cut -d ":" -f 2) if [ "$release" = false ]; then # Comment on the PR with the newly built kicbase - sed_cmd="\`\`\`\\n sed 's|Version = .*|Version = \\\"${KIC_VERSION}\\\"|;s|baseImageSHA = .*|baseImageSHA = \\\"${sha}\\\"|;s|gcrRepo = .*|gcrRepo = \\\"${GCR_REPO}\\\"|;s|dockerhubRepo = .*|dockerhubRepo = \\\"${DH_REPO}\\\"|' pkg/drivers/kic/types.go > new-types.go; mv new-types.go pkg/drivers/kic/types.go; make generate-docs;\\n\`\`\`" + sed_cmd="\`\`\`\n sed 's|Version = .*|Version = \"${KIC_VERSION}\"|;s|baseImageSHA = .*|baseImageSHA = \"${sha}\"|;s|gcrRepo = .*|gcrRepo = \"${GCR_REPO}\"|;s|dockerhubRepo = .*|dockerhubRepo = \"${DH_REPO}\"|' pkg/drivers/kic/types.go > new-types.go; mv new-types.go pkg/drivers/kic/types.go; make generate-docs;\n\`\`\`" - codeblock="\\n\\t// Version is the current version of kic\\n\\tVersion = \\\"${KIC_VERSION}\\\"\\n\\t// SHA of the kic base image\\n\\tbaseImageSHA = \\\"${sha}\\\"\\n\\t// The name of the GCR kicbase repository\\n\\tgcrRepo = \\\"${GCR_REPO}\\\"\\n\\t// The name of the Dockerhub kicbase repository\\n\\tdockerhubRepo = \\\"${DH_REPO}\\\"" + codeblock="\n\t// Version is the current version of kic\n\tVersion = \"${KIC_VERSION}\"\n\t// SHA of the kic base image\n\tbaseImageSHA = \"${sha}\"\n\t// The name of the GCR kicbase repository\n\tgcrRepo = \"${GCR_REPO}\"\n\t// The name of the Dockerhub kicbase repository\n\tdockerhubRepo = \"${DH_REPO}\"" # Display the message to the user - message="Hi ${ghprbPullAuthorLoginMention},\\n\\nA new kicbase image is available, please update your PR with the new tag and SHA.\\nIn pkg/drivers/kic/types.go:\\n${codeblock}\\nThen run \`make generate-docs\` to update our documentation to reference the new image.\n\nAlternatively, run the following command and commit the changes:${sed_cmd}\\n" + message="Hi ${ghprbPullAuthorLoginMention},\n\nA new kicbase image is available, please update your PR with the new tag and SHA.\nIn pkg/drivers/kic/types.go:\n${codeblock}\nThen run \`make generate-docs\` to update our documentation to reference the new image.\n\nAlternatively, run the following command and commit the changes:${sed_cmd}\n" gh pr comment ${ghprbPullId} --body "${message}" else