I have installed Jenkins in my local (https://localhost:8080) I tried triggerRemoteJob-plugin. I generated the below code using a snippet generator. The function call is failing with the below-shown error message.
What am I missing here?
triggerRemoteJob(
// auth: NoneAuth(), - this also didn't work
auth: TokenAuth(apiToken: '11xx90yycfxx77yy2dxxc9yy1bxx3cyy', userName: 'myuser'),
job: 'https://localhost:8080/job/dinesh-adhoc-script',
remoteJenkinsUrl: 'https://localhost:8080',
token: 'build-trigger-token',
maxConn: 1,
overrideTrustAllCertificates: true,
trustAllCertificates: true
)
Error Message:
Parameterized Remote Trigger Configuration:
- job: https://localhost:8080/job/dinesh-adhoc-script
- remoteJenkinsUrl: https://localhost:8080
- auth: 'Token Authentication' as user 'myuser'
- parameters:
- blockBuildUntilComplete: true
- connectionRetryLimit: 5
Connection to remote server failed, waiting for to retry - 10 seconds until next attempt.
URL: https://localhost:8080/job/dinesh-adhoc-script/api/json