Make sure enterprise api clients don't drift
This commit is contained in:
@@ -178,6 +178,10 @@ jobs:
|
||||
run: |
|
||||
extract_error_message='ERROR! API client generation failed!'
|
||||
yarn generate-apis || (echo "${extract_error_message}" && false)
|
||||
- name: Generate Enterprise API clients
|
||||
run: |
|
||||
extract_error_message='ERROR! API client generation failed!'
|
||||
yarn generate-enterprise-apis || (echo "${extract_error_message}" && false)
|
||||
- name: Verify generated clients
|
||||
run: |
|
||||
uncommited_error_message="ERROR! API client generation has not been committed. Please run 'yarn generate-apis', commit the changes and push again."
|
||||
@@ -187,3 +191,13 @@ jobs:
|
||||
echo "${uncommited_error_message}"
|
||||
exit 1
|
||||
fi
|
||||
- name: Verify generated enterprise clients
|
||||
run: |
|
||||
uncommited_error_message="ERROR! Enterprise API client generation has not been committed. Please run 'yarn generate-enterprise-apis', commit the changes and push again."
|
||||
cd ../grafana-enterprise
|
||||
file_diff="$(git diff)"
|
||||
if [ -n "$file_diff" ]; then
|
||||
echo "$file_diff"
|
||||
echo "${uncommited_error_message}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
"plugin:test:ci": "nx run-many -t test:ci --projects='tag:scope:plugin' --maxParallel=2",
|
||||
"plugin:i18n-extract": "nx run-many -t i18n-extract --projects='tag:scope:plugin'",
|
||||
"generate-apis": "yarn workspace @grafana/api-clients generate-apis",
|
||||
"generate-enterprise-apis": "yarn workspace @grafana/api-clients process-specs && NODE_OPTIONS='--disable-warning=ExperimentalWarning' rtk-query-codegen-openapi ./local/generate-enterprise-apis.ts",
|
||||
"generate:api-client": "yarn workspace @grafana/api-clients generate:api-client"
|
||||
},
|
||||
"grafana": {
|
||||
|
||||
Reference in New Issue
Block a user