| ... | @@ -49,9 +49,10 @@ |
... | @@ -49,9 +49,10 @@ |
|
|
|
|
|
|
|
- Download zip package and extract it
|
|
- Download zip package and extract it
|
|
|
- Lets delete few files from it. Don't worry we make them later again so we get full idea of CI
|
|
- Lets delete few files from it. Don't worry we make them later again so we get full idea of CI
|
|
|
- Delete files:
|
|
- Delete files and folder:
|
|
|
- .gitlab-ci.yml
|
|
- .gitlab-ci.yml
|
|
|
- sonar-project.properties
|
|
- sonar-project.properties
|
|
|
|
- sonar-scanner
|
|
|
- Next you need to download and install [GIT](https://git-scm.com/downloads)
|
|
- Next you need to download and install [GIT](https://git-scm.com/downloads)
|
|
|
- After the installation we can push the example project to Gitlab
|
|
- After the installation we can push the example project to Gitlab
|
|
|
- Go to folder where you extracted the project and deleted the files
|
|
- Go to folder where you extracted the project and deleted the files
|
| ... | @@ -310,7 +311,26 @@ running_scan: |
... | @@ -310,7 +311,26 @@ running_scan: |
|
|
- sonar-scanner.bat
|
|
- sonar-scanner.bat
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
- Now your project folder should look like this
|
|
|
|
|
|
|
|
|

|
|
|
|
|
|
|
|
- Next you only need to open GIT Bash in project's folder and push it to Gitlab
|
|
|
|
|
|
|
|
```shell
|
|
|
|
$ git add -A
|
|
|
|
$ git commit -m "added sonar-project.properties and .gitlab-ci.yml"
|
|
|
|
$ git push origin master
|
|
|
|
```
|
|
|
|
|
|
|
|
- After push runner activates and automatically runs scan for your project
|
|
|
|
- If CI/CD pipeline fails you need to restart gitlab-runner.exe and after restart go to Gitlab your project's CI/CD -> Pipelines and press Retry
|
|
|
|
|
|
|
|
```shell
|
|
|
|
C:\windows\system32>cd C:\GitLab-Runner\
|
|
|
|
|
|
|
|
C:\GitLab-Runner>gitlab-runner.exe restart
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| ... | |
... | |
| ... | | ... | |