0

I am using GitLab and would like to call within the .yml file an URL. I do have following .yml file so far:

stages:
  - test

L15-Release:    
  stage: test
  script:
    - curl -X POST "http://www.test.com" 
  when: manual
  tags:
    - ts

How can I call such http site with the curl command?

Thanks.

Nat Riddle
  • 928
  • 1
  • 10
  • 24
KD17
  • 35
  • 1
  • 1
  • 8
  • It may help you https://stackoverflow.com/questions/46031069/curl-command-not-found-on-gitlab-ci-yml – attin83 Sep 28 '21 at 13:09
  • is it possible to save the curl.exe directly on the gitlab server in order to call it afterwards? – KD17 Sep 28 '21 at 13:32
  • you have to install the curl and in the precedent link it shows how to do it with before_script. – attin83 Sep 28 '21 at 13:37
  • 1
    Does this answer your question? [curl command not found on .gitlab-ci.yml](https://stackoverflow.com/questions/46031069/curl-command-not-found-on-gitlab-ci-yml) – Mureinik Sep 28 '21 at 16:18
  • 1
    The answer depends on which [executor](https://docs.gitlab.com/runner/executors/) you are using. – slauth Sep 29 '21 at 06:36
  • I am using a powershell executor. So is it possible to install the curl.exe on the gitlab server in order to call a job (as done in the .yml file above) at any PC with the gitlab-runner? – KD17 Sep 29 '21 at 08:32
  • 1
    You'd need to install curl on the runner host in this case. This might or might not be the same as your GitLab host. – slauth Sep 29 '21 at 13:03
  • ok - how does the curl request within the .yml file looks like if it is installed on the host? Do you have an example? – KD17 Sep 30 '21 at 06:08

0 Answers0