resource/alicloud_vpc_ipv6_address: Added retry strategy for error code IncorrectStatus.Ipv6Instance #19147
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Pull Request Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| title: | |
| runs-on: ubuntu-latest | |
| name: Pull Request Title | |
| permissions: | |
| contents: read | |
| steps: | |
| - uses: jitterbit/get-changed-files@v1 | |
| id: files | |
| with: | |
| format: 'json' | |
| - name: Checking the title info | |
| run: | | |
| exitCode=0 | |
| prTitle="${{ github.event.pull_request.title }}" | |
| echo -e "PR Title: \033[1m${prTitle}\033[0m" | |
| if [[ ${prTitle} == *"…" ]]; then | |
| echo -e "\nERROR: The PR title should not omit important infos about added or modified files. \033[1mxxx... is not recommended.\033[0m" | |
| exitCode=1 | |
| fi | |
| docsOnly=true | |
| testcaseOnly=true | |
| docsChanged=false | |
| testcaseChanged=false | |
| readarray -t added_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added }}')" | |
| for added_file in ${added_files[@]}; do | |
| if [[ ${added_file} == *?_test.go ]]; then | |
| testcaseChanged=true | |
| continue | |
| fi | |
| if [[ ${added_file} == "website/docs"* ]]; then | |
| testcaseOnly=false | |
| docsChanged=true | |
| continue | |
| fi | |
| if [[ ${added_file} == "alicloud/resource_alicloud"* ]]; then | |
| docsOnly=false | |
| testcaseOnly=false | |
| prefix="alicloud/resource_" | |
| suffix=".go" | |
| resourceName=${added_file} | |
| resourceName=${resourceName#"$prefix"} | |
| resourceName=${resourceName%"$suffix"} | |
| titleStr="New Resource: ${resourceName}" | |
| if [[ ${prTitle} != *"${titleStr}"* ]]; then | |
| echo -e "\nERROR: The PR title should contains new resource info \033[1m${titleStr}\033[0m" | |
| exitCode=1 | |
| fi | |
| continue | |
| fi | |
| if [[ ${added_file} == "alicloud/data_source_alicloud"* ]]; then | |
| docsOnly=false | |
| testcaseOnly=false | |
| prefix="alicloud/data_source_" | |
| suffix=".go" | |
| resourceName=${added_file} | |
| resourceName=${resourceName#"$prefix"} | |
| resourceName=${resourceName%"$suffix"} | |
| titleStr="New Data Source: ${resourceName}" | |
| if [[ ${prTitle} != *"${titleStr}"* ]]; then | |
| echo -e "\nERROR: The PR title should contains new datasource info \033[1m${titleStr}\033[0m" | |
| exitCode=1 | |
| fi | |
| continue | |
| fi | |
| done | |
| readarray -t modified_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.modified }}')" | |
| for modified_file in ${modified_files[@]}; do | |
| if [[ ${modified_file} == *?_test.go ]]; then | |
| testcaseChanged=true | |
| continue | |
| fi | |
| if [[ ${modified_file} == "website/docs"* ]]; then | |
| testcaseOnly=false | |
| docsChanged=true | |
| continue | |
| fi | |
| if [[ ${modified_file} == "alicloud/resource_alicloud"* ]]; then | |
| docsOnly=false | |
| testcaseOnly=false | |
| prefix="alicloud/resource_" | |
| suffix=".go" | |
| resourceName=${modified_file} | |
| resourceName=${resourceName#"$prefix"} | |
| resourceName=${resourceName%"$suffix"} | |
| titleStr="resource/${resourceName}: " | |
| if [[ ${prTitle} != *"${titleStr}"* ]]; then | |
| echo -e "\nERROR: The PR title should contains modified info like \033[1m${titleStr}xxx\033[0m" | |
| exitCode=1 | |
| fi | |
| fi | |
| if [[ ${modified_file} == "alicloud/data_source_alicloud"* ]]; then | |
| docsOnly=false | |
| testcaseOnly=false | |
| prefix="alicloud/data_source_" | |
| suffix=".go" | |
| resourceName=${modified_file} | |
| resourceName=${resourceName#"$prefix"} | |
| resourceName=${resourceName%"$suffix"} | |
| titleStr="data-source/${resourceName}: " | |
| if [[ ${prTitle} != *"${titleStr}"* ]]; then | |
| echo -e "\nERROR: The PR title should contains modified info like \033[1m${titleStr}xxx\033[0m" | |
| exitCode=1 | |
| fi | |
| fi | |
| done | |
| if [[ ${docsChanged} == true && ${docsOnly} == true ]]; then | |
| titleStr="docs: " | |
| if [[ ${prTitle} != "${titleStr}"* ]]; then | |
| echo -e "\nERROR: The PR title should contains docs modified info like \033[1m${titleStr}xxx\033[0m" | |
| exitCode=1 | |
| fi | |
| elif [[ ${testcaseChanged} == true && ${testcaseOnly} == true ]]; then | |
| titleStr="testcase: " | |
| if [[ ${prTitle} != *"${titleStr}"* ]]; then | |
| echo -e "\nERROR: The PR title should contains testcase modified info like \033[1m${titleStr}xxx\033[0m" | |
| exitCode=1 | |
| fi | |
| fi | |
| exit ${exitCode} | |
| commits: | |
| runs-on: ubuntu-latest | |
| name: Pull Request Max Commits | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checking the max commits number | |
| run: | | |
| commitNum=${{ github.event.pull_request.commits }} | |
| if [[ ${commitNum} -gt 1 ]]; then | |
| echo -e "\nERROR: The PR has ${commitNum} commits, and please rebase it to 1.\n" | |
| exit 1 | |
| fi |