I am trying to automate a build but I can't get through the test stage. I have found a template for flutter app for the ".gitlab-ci.yml" and set up a local runner with shell.
I already have included the git path to the environment and I can use git in the powershell. I can't get the job to succeed. It doesn't seem to find the git command.
Here is the .gitlab-ci.yml file:
code_quality:
stage: test
image: "cirrusci/flutter:1.22.5"
before_script:
- pub global activate dart_code_metrics
- export PATH="$PATH":"$HOME/.pub-cache/bin"
script:
- metrics lib -r codeclimate > gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
This is the config of the runner:
concurrent = 2
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "local laptop"
url = deleted
token = deleted
executor = "shell"
shell = "powershell"
[runners.custom_build_dir]
[runners.cache]
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
And this is the error:
Running with gitlab-runner 14.9.1 (bd40e3da)
on local laptop yHX7nELF
Preparing the "shell" executor
00:00
Using Shell executor...
Preparing environment
00:00
Running on LT...
Getting source from Git repository
00:02
Fetching changes with git depth set to 50...
& : Die Benennung "git" wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausf�hrbaren
Programms erkannt. �berpr�fen Sie die Schreibweise des Namens, oder ob der Pfad korrekt ist (sofern enthalten), und
wiederholen Sie den Vorgang.
In C:\WINDOWS\TEMP\build_script2239212065\script.ps1:221 Zeichen:3
+ & "git" "config" "-f" "C:\GitLab-Runner\builds\yHX7nELF\0\ads\kurt-ca ...
+ ~~~~~
+ CategoryInfo : ObjectNotFound: (git:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Uploading artifacts for failed job
00:00
Version: 14.9.1
Git revision: bd40e3da
Git branch: 14-9-stable
GO version: go1.17.7
Built: 2022-03-22T21:26:32+0000
OS/Arch: windows/amd64
Uploading artifacts...
Runtime platform arch=amd64 os=windows pid=15980 revision=bd40e3da version=14.9.1
WARNING: gl-code-quality-report.json: no matching files
ERROR: No files to upload
Cleaning up project directory and file based variables
00:01
ERROR: Job failed: exit status 1
Thank you in advance!