0

I am trying to download dependency-check-7.4.1-release.zip using the below script in my GitLab Ci Pipeline:

script:
    - VERSION=$(curl https://jeremylong.github.io/DependencyCheck/current.txt)
    - curl "https://github.com/jeremylong/DependencyCheck/releases/download/v$VERSION/dependency-check-$VERSION-release.zip" --output dependency-check.zip
    - ls -al
    - unzip dependency-check-${VERSION}-release.zip

The file is present in the build directory as show below:

total 40
drwxrwxrwx    9 root     root           250 Dec 13 18:27 .
drwxrwxrwx   18 root     root          4096 Dec 13 16:22 ..
-rw-rw-rw-    1 root     root         13347 Dec 13 13:18 .editorconfig
drwxrwxrwx    6 root     root           128 Dec 13 18:27 .git
-rw-rw-rw-    1 root     root          7471 Dec 13 13:18 .gitignore
-rw-rw-rw-    1 root     root          3397 Dec 13 18:27 .gitlab-ci.yml
drwxrwxrwx    6 root     root           326 Dec 13 13:18 xxxx
drwxrwxrwx    6 root     root            97 Dec 13 13:18 xxxx.Test
-rw-rw-rw-    1 root     root          1833 Dec 13 13:18 xxxx
drwxrwxrwx    2 root     root           197 Dec 13 13:18 PostMan
-rw-rw-rw-    1 root     root          1265 Dec 13 13:18 README.md
-rw-r--r--    1 root     root             0 Dec 13 18:27 dependency-check.zip
drwxrwxrwx    3 root     root           100 Dec 13 13:18 migration
drwxrwxrwx    2 root     root            32 Dec 13 16:14 templates
drwxrwxrwx    4 root     root           201 Dec 13 13:18 [MASKED]

i am using this image: mcr.microsoft.com/dotnet/runtime:6.0-alpine3.14

I can not figure out what I did wrong. Any help?

xfusion
  • 3
  • 2
  • 1
    See https://stackoverflow.com/a/46060099/2030808. You either need add the `-L` option to your `curl` commandline or use `wget` instead of `curl` – pmqs Dec 13 '22 at 19:11
  • 2
    I come late. But both works. `curl -L` and `wget` Thanks @pmqs – xfusion Jan 26 '23 at 14:56

0 Answers0