chore(lint): correct lint errors

!25
This commit is contained in:
2023-05-22 13:24:18 +09:30
parent 8e2a233814
commit 065bcbf517
12 changed files with 59 additions and 36 deletions

View File

@ -120,7 +120,6 @@ gilab-ci.yml Lint (python 3.11):
image: python:3.11-slim
Gitlab Release:
variables:
MY_COMMAND: ./sub-folder_changlog.sh

View File

@ -36,7 +36,6 @@
- when: never
.Lint_Markdown_Pages:
variables:
MDLINT_PATHS: "pages/*.md pages/**/*.md pages/**/**/*.md pages/**/**/**/*.md pages/**/**/**/**/**/*.md #CHANGELOG.md !gitlab-ci !website-template"

View File

@ -52,14 +52,16 @@ Ansible Lint (python 3.6):
## Job Workflow
- This job will lint any yml file in the specified directory using ansible rules.
- This job will lint any yml file in the specified directory using ansible rules.
## Artifacts
- `$CI_PROJECT_DIR/artifacts` - Root artifact directory
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$PYTHON_VERSION-ansible-lint.junit.xml` - JUnit Test report
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-ansible-lint.log` - Linter log
- `$CI_PROJECT_DIR/artifacts` - Root artifact directory
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$PYTHON_VERSION-ansible-lint.junit.xml` - JUnit Test report
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-ansible-lint.log` - Linter log
## License

View File

@ -28,20 +28,20 @@ Ensure that the merge request title is in the [conventional message](https://www
### Commit Messages
All commit messages that form part of your merge request must be in [conventional message](https://www.conventionalcommits.org/en/v1.0.0/) format.
All commit messages that form part of your merge request must be in [conventional message](https://www.conventionalcommits.org/en/v1.0.0/) format.
To fix them go back and edit your commit messages.
#### fixing commit messages (suggestion)
If only the last commit is the commit with an error just use `git commit --amend` and edit your commit message to be in the correct format and save. now push your changes.
If only the last commit is the commit with an error just use `git commit --amend` and edit your commit message to be in the correct format and save. now push your changes.
You will require the following information if the commit message with the error is further down the commit tree:
- Commit message SHA1 of your first commit message to the branch `{original_commit}`
- Commit message SHA1 of your first commit message to the branch `{original_commit}`
- Commit message SHA1 prior to your first commit `{source_commit}`
- Commit message SHA1 prior to your first commit `{source_commit}`
Run these commands once you have the information above.

View File

@ -29,4 +29,4 @@ about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
# GIT_SYNC_URL: "https://$GITHUB_USERNAME_ROBOT:$GITHUB_TOKEN_ROBOT@github.com/NoFussComputing/config.git" # Must be defined for job to run
# JOB_STOP_GITLAB_RELEASE: 'any value'
```
```

View File

@ -13,6 +13,7 @@ This job provides the following badge:
- None
## Dependencies
- None
@ -48,7 +49,7 @@ Github (Push --mirror):
## Job Workflow
- This job is designed to run on successful completion of the validation tasks and only on the `development` and `master` branches. You can safely override the `rules` when creating the job with your own. i.e.
- This job is designed to run on successful completion of the validation tasks and only on the `development` and `master` branches. You can safely override the `rules` when creating the job with your own. i.e.
``` yaml
@ -70,7 +71,8 @@ This will cause the job to only run on the `development` branch.
## Artifacts
- None
- None
## License

View File

@ -7,21 +7,21 @@ about: https://gitlab.com/nofusscomputing/projects/gitlab-ci
---
# User Manual
## User Manual
All commit messages must be in [conventional commit format](https://www.conventionalcommits.org/en/v1.0.0/) and have a footer with a gitlab reference. The reference **must** be either a merge request or a gitlab issue. (format i.e. `!1` or `#2` *using the correct reference number*).
## fixing commit messages (suggestion)
### fixing commit messages (suggestion)
If only the last commit is the commit with an error just use `git commit --amend` and edit your commit message to be in the correct format and save. now push your changes.
If only the last commit is the commit with an error just use `git commit --amend` and edit your commit message to be in the correct format and save. now push your changes.
You will require the following information if the commit message with the error is further down the commit tree:
- Commit message SHA1 of your first commit message to the branch `{original_commit}`
- Commit message SHA1 of your first commit message to the branch `{original_commit}`
- Commit message SHA1 prior to your first commit `{source_commit}`
- Commit message SHA1 prior to your first commit `{source_commit}`
Run these commands once you have the information above.
@ -52,9 +52,9 @@ Now push your changes upstream.
| *Ensure that all of your commits were exported prior to reseting the branch and when re-applying, that all of your commits were applied correctly* |
# Gitlab Release - Developer Manual
## Gitlab Release - Developer Manual
This job bumps the version, updates the changelog, creates a git tag and creates a gitlab release. The git tag and release title use [semantic versioning](https://semver.org/). for this job to function correctly a `.cz.yaml` is required in the root of the repository. this file contains the [commitizen](https://github.com/commitizen-tools/commitizen) config and the version details.
This job bumps the version, updates the changelog, creates a git tag and creates a gitlab release. The git tag and release title use [semantic versioning](https://semver.org/). for this job to function correctly a `.cz.yaml` is required in the root of the repository. this file contains the [commitizen](https://github.com/commitizen-tools/commitizen) config and the version details.
This job has the following workflow:
@ -73,11 +73,13 @@ This job provides the following badge:
- None
## Dependencies
### Dependencies
- None
## your .gitlab-ci.yml changes
### your .gitlab-ci.yml changes
To use this job add the following to your `.gitlab-ci.yml` file
@ -103,7 +105,7 @@ Gitlab Release:
> if you wish to run any commands you can add them to variable `MY_COMMAND`. The custom command will run under shell `/bin/sh`. This command is set to run before the version bump commit is conducted so any changes you wish to add as part of the version bump, you can do here as long as you `git add {changed file name}`.
## CI/CD Variables required
### CI/CD Variables required
| var name | Description |
|:----:|:----|
@ -111,7 +113,7 @@ Gitlab Release:
| CHANGELOG_FOOTER_REFERENCES | ***Optional** If set to `False` the changelog will not output gitlab references for each entry of the changelog. If this variable is set globally, it will also prevent the creation of the CI job to validate a users commits as having gitlab references.* |
## Job Workflow
### Job Workflow
This CI job's workflow is:
@ -119,7 +121,7 @@ This CI job's workflow is:
1. commit the changelog to git
1. adds a `git tag` to the changelog commit.
1. adds a `git tag` to the changelog commit.
1. pushes the change back to the repo
@ -130,7 +132,7 @@ This CI job's workflow is:
| *If the user has forked the branch, they must keep the development brnach synced with the main repo. If they **don't** the CI job 'commit footer refs' will fail as it will not be able to fetch the parent (`development`) hash of the branch.* |
## Artifacts
### Artifacts
- `ci commit footer`
> $CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$CI_JOB_NAME.junit.xml
@ -138,7 +140,8 @@ This CI job's workflow is:
- `Gitlab Release`
> None
## License
### License
To view the license for this folder and any sub-folders, refer [here](https://gitlab.com/nofusscomputing/projects/gitlab-ci)

View File

@ -14,11 +14,14 @@ This job provides the following badge:
- _None_
## Dependencies
- **Optional** file `.markdownlint.json` in repository root with any rules you wish to specify
## your .gitlab-ci.yml changes
To use this job add the following to your `.gitlab-ci.yml` file
``` yaml
@ -35,6 +38,7 @@ Markdown Linting:
```
## CI/CD Variables required
| var name | Description |
@ -43,15 +47,19 @@ Markdown Linting:
| MDLINT_EXCLUDE_PATHS | **optional** Specifies the paths to exclude from linting. Defaults to `"!gitlab-ci"` |
| MD_LINT_CONFIG-PATH | **Optional** Specifies a path whenre the lint config file is. defaults to none. this variable enables you to specify a config that will be copied to the project root folder. ***Note:** if specified, the file will be deleted at the end of the linting job.*
## Job Workflow
1. installs the required job dependencies
1. Lints any markdow file found in `$MDLINT_PATH`, excluding paths `$MDLINT_EXCLUDE_PATHS`
## Artifacts
- JUnit test report located at `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/*.junit.xml`
## License
To view the license for this folder and any sub-folders, refer [here](https://gitlab.com/nofusscomputing/projects/gitlab-ci)

View File

@ -45,6 +45,7 @@ MKDocs build:
| MKDOCS_INCLUDE_SOURCE | **Optional** Include the build source files in the artifacts. Default is Not set. Any value in this variable, will include the source files. |
| MKDOCS_SOURCE_PATH | **Optional, if source files are not to be included** Set to the path where mkdocs uses to build the static html. |
## Job Workflow
1. install mkdocs
@ -64,6 +65,7 @@ MKDocs build:
- files in `"$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME"`
## License
To view the license for this folder and any sub-folders, refer [here](https://gitlab.com/nofusscomputing/projects/gitlab-ci)

View File

@ -60,7 +60,9 @@ artifacts/validation/tests/gl-code-quality-report.html
- None
## your .gitlab-ci.yml changes
To add the `PyLint` job, add the following to your `.gitlab-ci.yml` file
``` yaml
@ -92,14 +94,17 @@ PyLint:
## Job Workflow
- This job will lint any yaml file in the specified directory using the specified rules.
- This job will lint any yaml file in the specified directory using the specified rules.
## Artifacts
- `$CI_PROJECT_DIR/artifacts` - Root artifact directory
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.json` - Gitlab code quality report (displays in merge request)
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.html` - html code quality report
- `$CI_PROJECT_DIR/artifacts` - Root artifact directory
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.json` - Gitlab code quality report (displays in merge request)
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/gl-code-quality-report.html` - html code quality report
## License

View File

@ -12,6 +12,7 @@ This job provides the following badge:
- None
## Dependencies
- None
@ -52,14 +53,16 @@ Yaml Lint (python 3.6):
## Job Workflow
- This job will lint any yaml file in the specified directory using the specified rules.
- This job will lint any yaml file in the specified directory using the specified rules.
## Artifacts
- `$CI_PROJECT_DIR/artifacts` - Root artifact directory
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$PYTHON_VERSION-yaml-lint.junit.xml` - JUnit Test report
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-yaml-lint.log` - Linter log
- `$CI_PROJECT_DIR/artifacts` - Root artifact directory
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/tests/$PYTHON_VERSION-yaml-lint.junit.xml` - JUnit Test report
- `$CI_PROJECT_DIR/artifacts/$CI_JOB_STAGE/$CI_JOB_NAME/$PYTHON_VERSION-yaml-lint.log` - Linter log
## License

View File

@ -28,7 +28,7 @@ pages:
url: $CI_PAGES_URL/projects/gitlab-ci/
artifacts:
paths:
- public
- public
rules:
- if: '$JOB_STOP_GITLAB_PAGES'
when: never