patternMinor
Gitlab Runner not running scripts with Windows shell configuration
Viewed 0 times
scriptswithgitlabshellrunnerrunningwindowsconfigurationnot
Problem
I have a Gitlab Runner running locally on my windows box. It works fine for the before script section.
my
It does not do anything after the before script, though. Does not run any of the jobs.
How can I find out what's going on?
I was able to fix it with a super-non-ideal/hacky solution that I don't like:
People sending comments have also prompted me to add that in Windows it seems to be stopping at the first array element in every script session.
With a Docker configuration for the runner I can do things like:
With the windows shell runner it just stops after
my
.gitlab-ci.yml follows:before_script:
- pushd . && uru 233 && popd && set HOME=c:\ && ruby -v && bundle install
rspec:
script:
- bundle exec rspec
rubocop:
script:
- bundle exec rubocop
flay:
script:
- bundle exec flay *It does not do anything after the before script, though. Does not run any of the jobs.
How can I find out what's going on?
I was able to fix it with a super-non-ideal/hacky solution that I don't like:
rspec:
script:
- pushd . && uru 233 && popd && set HOME=c:\ && ruby -v && bundle install && bundle exec rspec
rubocop:
script:
- pushd . && uru 233 && popd && set HOME=c:\ && ruby -v && bundle install && bundle exec rubocop
flay:
script:
- pushd . && uru 233 && popd && set HOME=c:\ && ruby -v && bundle install && bundle exec flay *People sending comments have also prompted me to add that in Windows it seems to be stopping at the first array element in every script session.
With a Docker configuration for the runner I can do things like:
my_job_name:
script:
- a command
- another commandWith the windows shell runner it just stops after
a command if I do it this way. Stringing the commands together seemed to work, but I would rather not have to put everything on one line.Solution
stages are required
Could you try the following:
stages:
- stage1
stage1:
stage: stage1
script:
- echo helloCould you try the following:
before_script:
- pushd . && uru 233 && popd && set HOME=c:\ && ruby -v && bundle install
stages:
- rspec
- rubocop
- flay
rspec:
stage: rspec
script:
- bundle exec rspec
rubocop:
stage: rubocop
script:
- bundle exec rubocop
flay:
stage: flay
script:
- bundle exec flay *Code Snippets
stages:
- stage1
stage1:
stage: stage1
script:
- echo hellobefore_script:
- pushd . && uru 233 && popd && set HOME=c:\ && ruby -v && bundle install
stages:
- rspec
- rubocop
- flay
rspec:
stage: rspec
script:
- bundle exec rspec
rubocop:
stage: rubocop
script:
- bundle exec rubocop
flay:
stage: flay
script:
- bundle exec flay *Context
StackExchange DevOps Q#2086, answer score: 4
Revisions (0)
No revisions yet.