How can I trigger a job on jenkins server (OD-1746)
sergeevms opened 2 years ago

Hello! @robin thank you for the great job!

Can you tell me what is the best way to setup some trigger on repository push action to trigger jenkins pipeline

JENKINS_URL/job/test2/build?token=TOKEN_NAME

Thanks!

  • Robin Shen commented 2 years ago

    How about set up a job running upon repository push at OneDev side, and then have the job itself calling jenkins pipeline via curl?

  • sergeevms commented 2 years ago

    Thanks for the answer. I have tried but got:

    Remote shell executor can only execute jobs on agents running directly on bare metal/virtual machine
    

    Is it possible with Server Shell Executor? I do not have available Server Shell Executor to check it. How can I create Server Shell Executor?

  • Robin Shen commented 2 years ago

    You may create a remote docker executor instead of remote shell executor. If you want to run jobs on server, create a server docker executor instead.

  • sergeevms commented 2 years ago

    You may create a remote docker executor

    I have the remote docker executor and try it but had the same error with default or custom-linux-shell Interpreter. Do I have to use Run in container option?

  • Robin Shen commented 2 years ago

    Yes, the docker executor can only run commands inside container. If you want to run commands directly on host machine instead of container, you will need to run OneDev server or agent directly on host machine (the bare metal / virtual machine installation approach).

  • sergeevms changed state to 'Closed' 2 years ago
    Previous Value Current Value
    Open
    Closed
  • sergeevms commented 2 years ago

    Thanks!

issue 1/1
Type
Question
Priority
Normal
Assignee
Labels
No labels
Issue Votes (0)
Watchers (3)
Reference
OD-1746
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover