Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

125/5000 gitlab webhook has the following error: {"jobs":null,"message":"Did not find any jobs with GenericTrigger configured! \nA token was supplied.\n"} #313

Closed
wangkunyu123 opened this issue May 28, 2024 · 2 comments
Labels

Comments

@wangkunyu123
Copy link

Jenkins and plugins versions report

I have added a variable $TOKEN to the Jenkins Generic Webhook Trigger, set it in the TOKEN configuration entry, and also included it in the Groovy script configuration:
triggers {
GenericTrigger (
causeString: 'Triggered by develop',
genericVariables: [[key: 'ref', value: '$.ref'],[key: 'TOKEN', value: '$TOKEN']],
token: '$TOKEN'
)
}
environment {
TOKEN = "develop"
}
I have configured token=develop in the GitLab webhook URL. However, after testing the build, I encountered the following error message: {"jobs":null,"message":"Did not find any jobs with GenericTrigger configured! \nA token was supplied.\n"}
I want to ensure that this plan is feasible.

@tomasbjerre
Copy link
Contributor

I would try it with curl first before involving Gitlab.

I would not use environment variable for the token, but hard code token like: token: 'develop'.

This looks strange: [key: 'TOKEN', value: '$TOKEN']. The value here should be a jsonpath and key the variable to store result.

@wangkunyu123
Copy link
Author

在使用 Gitlab 之前,我会先用 curl 尝试一下。

我不会对令牌使用环境变量,而是使用类似这样的硬编码令牌:token: 'develop'

这看起来很奇怪:[key: 'TOKEN', value: '$TOKEN']。这里的值应该是一个 jsonpath,并且键是存储结果的变量。

Ah, I understand now. My previous assumption was incorrect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants