When I used the GitLab runner to run CICD in my project, I found the pipeline ran quite slowly, and it even did not pass the first stage of the work. I set my runner executor as "pwsh". I also downloaded PowerShell 7 for Windows. The following is my .yml file:
stages:
- build
- test
- deploy
Build Job:
stage: build
script:
- echo "This is a first sample Build Job."
Test Job:
stage: test
script:
- echo "This is a first sample Test Job."
Deploy Job:
stage: deploy
script:
- echo "This is a first sample Deploy Job."
I cannot figure out why the runner can not finish this basic pipeline in just a few seconds. It had ran for 11 minutes in the build stage.
Here is my runner information:
[[runners]]
name = "Local_TYC"
url = "https://gitlab.com/"
id = 23245609
token = "glrt-xxxxxx"
executor = "shell"
shell = "pwsh"
I looked at a website to first solve the problem of pwsh path not found: exec: "pwsh": executable file not found in %PATH%
It seemed to work and successfully connect to my runner. And I also put the path of Powershell 7 from windows to the environment variable.