-1

I am following this : https://bobbybouwmann.nl/blog/dependabot-on-gitlab, to attempt to get Dependabot working with gitlab. I get the following error?

Using docker image sha256:bc6c0ffef6650bcfbb0afd5a07b813b5ccf1d00ecddccadb85123c6ee57a7995 for docker with digest docker@sha256:63107bd6ce718f130bb2668704239467b74f034c446f9e9c4ae1ffa5ddf4e3dd ...
$ docker build -t "dependabot/dependabot-script" -f Dockerfile .
error during connect: Post "http://docker:2375/v1.24/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&shmsize=0&t=dependabot%2Fdependabot-script&target=&ulimits=null&version=1": dial tcp: lookup docker on 172.31.0.2:53: no such host

So I checked, and the specified docker image does not exist: https://hub.docker.com/u/dependabot

but, if I use a different, publicly available image, I get this:

Executing "step_script" stage of the job script
00:03
Using docker image sha256:ed97757f85d791b7e0a967622f0d671b810d1ad45aef30d5314dcaef94e7c457 for sethjones/dependabot-script with digest sethjones/dependabot-script@sha256:209a0952bfeb845f67f2eeb9a647c25e058bbae1b9b0e343d7891884840f17e0 ...
/usr/local/lib/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- dependabot/file_fetchers (LoadError)
    from /usr/local/lib/site_ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    from ./generic-update-script.rb:4:in `<main>'
Cleaning up file based variables
00:01
ERROR: Job failed: exit code 1
HellishHeat
  • 2,280
  • 4
  • 31
  • 37

1 Answers1

1

I'd recommend that you check out the Dependabot GitLab repository. They provide a CI/CD template that is kept up-to-date, so instead of having to write your own jobs you can include their template using:

include:
  - project: 'dependabot-gitlab/dependabot-standalone'
    file: '.gitlab-ci.yml'

They also provide instructions on their page for how to configure it to automatically create MRs.

Patrick
  • 2,885
  • 1
  • 14
  • 20
  • What might I be doing wrong?: Found errors in your .gitlab-ci.yml: Project `dependabot-gitlab/dependabot-standalone` not found or access denied! – HellishHeat Oct 07 '21 at 12:04
  • I have added the personal accesss token for gitlab, as the specified variable. – HellishHeat Oct 07 '21 at 12:21
  • Are you running a self-hosted gitlab? If so, you should try referencing the file by it's full URL instead of project/file. You can only reference files by project/file combo when it's within the same gitlab instance. To do this, try using "https://gitlab.com/dependabot-gitlab/dependabot-standalone/-/raw/master/.gitlab-ci.yml" instead of the project/file combo. – Patrick Oct 08 '21 at 01:51
  • I'm sure this is solid advice, but I've parked this, for now, so am unable to verify. – HellishHeat Oct 25 '21 at 13:01