[DO-110] fixed Gitea Action workflow file (#22)
- Создан конфиг для Groovy линтера и workflow для Gitea action чтобы запускать этот линтер. Reviewed-on: https://git.avroid.tech/DevOps/jenkins-shared-lib/pulls/22
This commit is contained in:
@@ -18,8 +18,8 @@ jobs:
|
|||||||
container:
|
container:
|
||||||
image: harbor.avroid.tech/devops/npm-groovy-lint:14.4.1-0
|
image: harbor.avroid.tech/devops/npm-groovy-lint:14.4.1-0
|
||||||
steps:
|
steps:
|
||||||
- run: echo "Start job on ${{ runner.name }} with os ${{ runner.os }}"
|
- run: echo "Start job on ${{ runner.name }} with OS ${{ runner.os }}"
|
||||||
- run: echo "Work with branch ${{ gitea.ref }} repository ${{ gitea.repository }}"
|
- run: echo "Work with branch ${{ gitea.ref }} in repository ${{ gitea.repository }}"
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Mirrors/github-actions-checkout.git@v4
|
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Mirrors/github-actions-checkout.git@v4
|
||||||
with:
|
with:
|
||||||
@@ -31,9 +31,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
**/*.groovy
|
**/*.groovy
|
||||||
- name: Run step if any of the listed files above change
|
**/Jenkinsfile
|
||||||
|
- name: Run step if there is no changed files
|
||||||
|
id: no_files_to_check
|
||||||
|
if: steps.changed-files-specific.outputs.any_changed != 'true'
|
||||||
|
run: echo "*** No changed groovy files, nothing to check. ***"
|
||||||
|
|
||||||
|
- name: Run linter for changed files
|
||||||
id: groovy_linter
|
id: groovy_linter
|
||||||
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/npm-groovy-lint-docker-action.git@v7
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
|
uses: https://gitea:${{ secrets.CI_TOKEN }}@git.avroid.tech/Actions/npm-groovy-lint-docker-action.git@v17
|
||||||
with:
|
with:
|
||||||
input_flags: "--failon error"
|
input_flags: "--failon error"
|
||||||
input_files: ${{ steps.changed-files-specific.outputs.all_changed_files }}
|
input_files: ${{ steps.changed-files-specific.outputs.all_changed_files }}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
"ignoreVariableNames": "_"
|
"ignoreVariableNames": "_"
|
||||||
},
|
},
|
||||||
"naming.FactoryMethodName": "off",
|
"naming.FactoryMethodName": "off",
|
||||||
"naming.PropertyName": "off",
|
|
||||||
"unnecessary.UnnecessaryGetter": "off",
|
"unnecessary.UnnecessaryGetter": "off",
|
||||||
"size.NestedBlockDepth": {
|
"size.NestedBlockDepth": {
|
||||||
"maxNestedBlockDepth": 10
|
"maxNestedBlockDepth": 10
|
||||||
|
|||||||
Reference in New Issue
Block a user