Job 'dirname/jobname' is not defined in Jenkins
sanderv32 opened this issue · comments
With the last release I still get {"result":"ERROR","message":"Job 'dirname/jobname' is not defined in Jenkins"}
if the job is placed in a folder. Without folder all is ok.
@urusha Investigating this problem. Can you confirm that version 1.0.11 is working?
Yes, confirming.
Thanks. Found the problem and i'm working on PR #37 which fixes the problem. Will release a new version of the plugin before or in the weekend.
Released version 1.0.13 with the fix. Integration test is also inplace so if this breaks again it's noticed.
Hello @sanderv32, even with your last Pull Request, i'm still facing that issue :
Jenkins version : 2.110
Gogs-plugins version : 1.0.13
I'm using a Multibranch pipeline called "application-streams" defined on Jenkins into a job with the same name and display name : application-streams.
I'm using your plugin since a long time ago but the Webhook is still flaky and not fully functionnal :
This is my webhook config on the Gogs's side, and here my Jenkins job :
The Scan is going well but when i try to use the webhook by pushing or just by using the test request drectly on Gogs i still have :
I thought that the last PR fixed that, do you have any ideas ?
Thanks
@theobolo Can you please paste the request part as its clear that the response shows the job can't be found.
@sanderv32 Hello, there it is :
{
"ref": "refs/heads/releases/release-0.7.10",
"before": "9270aebe74e98adbc11ee8ff4e19c08732807e63",
"after": "a5872426162a8467e2cfa7a5c818bb1ecc718ff0",
"compare_url": "http://git.fleeters.io/CoursierPrive.com/application-streams/compare/9270aebe74e98adbc11ee8ff4e19c08732807e63...a5872426162a8467e2cfa7a5c818bb1ecc718ff0",
"commits": [
{
"id": "a5872426162a8467e2cfa7a5c818bb1ecc718ff0",
"message": "Avancement test automatisés\n",
"url": "http://git.fleeters.io/CoursierPrive.com/application-streams/commit/a5872426162a8467e2cfa7a5c818bb1ecc718ff0",
"author": {
"name": "Vincent WUHRLIN",
"email": "vincent.wuhrlin@coursierprive.com",
"username": "vincent.wuhrlin"
},
"committer": {
"name": "Vincent WUHRLIN",
"email": "vincent.wuhrlin@coursierprive.com",
"username": "vincent.wuhrlin"
},
"added": [
"src/test/java/com/coursierprive/streams/test/Main.java"
],
"removed": [
"src/test/java/com/coursierprive/streams/test/yahoo/AStreamsTests2.java",
"src/test/java/com/coursierprive/streams/test/yahoo/CreateCompany.java",
"src/test/java/com/coursierprive/streams/test/yahoo/DATA_V.java",
"src/test/java/com/coursierprive/streams/test/yahoo/Data.java",
"src/test/java/com/coursierprive/streams/test/yahoo/FleetersExtension.java",
"src/test/java/com/coursierprive/streams/test/yahoo/HazelcastInstances.java",
"src/test/java/com/coursierprive/streams/test/yahoo/InitializeContext.java",
"src/test/java/com/coursierprive/streams/test/yahoo/InitializeTestParameters.java",
"src/test/java/com/coursierprive/streams/test/yahoo/Inject.java",
"src/test/java/com/coursierprive/streams/test/yahoo/MockitoExtension.java",
"src/test/java/com/coursierprive/streams/test/yahoo/TestDemo.java"
],
"modified": [
"application.template.yml",
"build.gradle",
"src/main/resources/hazelcast-jet.xml",
"src/main/resources/hazelcast.xml",
"src/test/java/com/coursierprive/streams/test/VinzSuite.java",
"src/test/java/com/coursierprive/streams/test/yahoo/StreamsTests.java",
"src/test/resources/tests/configuration.yaml",
"src/test/resources/tests/logback.xml"
],
"timestamp": "2018-03-25T01:57:19Z"
}
],
"repository": {
"id": 22,
"owner": {
"id": 2,
"login": "CoursierPrive.com",
"full_name": "Coursierprive.com / Fleeters.io",
"email": "",
"avatar_url": "http://git.fleeters.io/avatars/2",
"username": "CoursierPrive.com"
},
"name": "application-streams",
"full_name": "CoursierPrive.com/application-streams",
"description": "",
"private": true,
"fork": false,
"parent": null,
"empty": false,
"mirror": false,
"size": 12103680,
"html_url": "http://git.fleeters.io/CoursierPrive.com/application-streams",
"ssh_url": "git@git.fleeters.io:CoursierPrive.com/application-streams.git",
"clone_url": "http://git.fleeters.io/CoursierPrive.com/application-streams.git",
"website": "",
"stars_count": 1,
"forks_count": 2,
"watchers_count": 7,
"open_issues_count": 0,
"default_branch": "releases/release-0.7.6",
"created_at": "2017-04-06T12:48:47Z",
"updated_at": "2018-03-23T12:18:04Z"
},
"pusher": {
"id": 3,
"login": "vincent.wuhrlin",
"full_name": "Vincent Wuhrlin",
"email": "vincent.wuhrlin@coursierprive.com",
"avatar_url": "https://secure.gravatar.com/avatar/d3ff8546e3d5857a1305bcbf0bd1d854",
"username": "vincent.wuhrlin"
},
"sender": {
"id": 3,
"login": "vincent.wuhrlin",
"full_name": "Vincent Wuhrlin",
"email": "vincent.wuhrlin@coursierprive.com",
"avatar_url": "https://secure.gravatar.com/avatar/d3ff8546e3d5857a1305bcbf0bd1d854",
"username": "vincent.wuhrlin"
}
}
@sanderv32 Well it seems that not all my job are concerned about that... i've a Jenkins job called "docker-elasticsearch" on the same repo, but under the user theo.bolo
and not CoursierPrive.com
(the git user).
I'm not sure where this come from but it's working with some jobs...
And the working request :
{
"ref": "refs/heads/master",
"before": "a67a8f15b8a6aba769556ca795aa1ac606588879",
"after": "a67a8f15b8a6aba769556ca795aa1ac606588879",
"compare_url": "",
"commits": [
{
"id": "a67a8f15b8a6aba769556ca795aa1ac606588879",
"message": "Test Webhook Gogs\n",
"url": "http://git.fleeters.io/theo.bolo/docker-elasticsearch/commit/a67a8f15b8a6aba769556ca795aa1ac606588879",
"author": {
"name": "theo.bolo",
"email": "theo@fleeters.io",
"username": ""
},
"committer": {
"name": "theo.bolo",
"email": "theo@fleeters.io",
"username": ""
},
"added": [],
"removed": [],
"modified": [
"Dockerfile"
],
"timestamp": "0001-01-01T00:00:00Z"
}
],
"repository": {
"id": 63,
"owner": {
"id": 1,
"login": "theo.bolo",
"full_name": "Théo Bolognini",
"email": "theo@coursierprive.com",
"avatar_url": "http://git.fleeters.io/avatars/1",
"username": "theo.bolo"
},
"name": "docker-elasticsearch",
"full_name": "theo.bolo/docker-elasticsearch",
"description": "Automatic elasticsearch docker image build",
"private": true,
"fork": false,
"parent": null,
"empty": false,
"mirror": false,
"size": 90112,
"html_url": "http://git.fleeters.io/theo.bolo/docker-elasticsearch",
"ssh_url": "git@git.fleeters.io:theo.bolo/docker-elasticsearch.git",
"clone_url": "http://git.fleeters.io/theo.bolo/docker-elasticsearch.git",
"website": "",
"stars_count": 0,
"forks_count": 0,
"watchers_count": 1,
"open_issues_count": 0,
"default_branch": "master",
"created_at": "2018-03-13T11:27:11Z",
"updated_at": "2018-03-28T14:02:51Z"
},
"pusher": {
"id": 1,
"login": "theo.bolo",
"full_name": "Théo Bolognini",
"email": "theo@coursierprive.com",
"avatar_url": "http://git.fleeters.io/avatars/1",
"username": "theo.bolo"
},
"sender": {
"id": 1,
"login": "theo.bolo",
"full_name": "Théo Bolognini",
"email": "theo@coursierprive.com",
"avatar_url": "http://git.fleeters.io/avatars/1",
"username": "theo.bolo"
}
}
@theobolo Just out of curiosity, did the previous version of the webhook-plugin show the same behaviour?
@sanderv32 I'm not really sure about that, i know that it was working recently but still flaky, but i can't tell if i was on 1.0.12 or a previous one.
Basically it's working on some jobs, even on job with the same CoursierPrive.com
user on gogs.
@sanderv32 I found that the master branch is working on the application-streams
project. But not working on branches.
@theobolo Just tested the plugin with the multibranch plugin but everything seems to be working fine. What does the multibranch scan log show?
@sanderv32 Yep it's working with multibranch but not on all my branches, maybe because i usea kind of releases/release-vX.X.X
pattern as branch name, no ?
it's happening 99% on that kind of branches, the scan is correct and it founds all the branches.
I created a bonjour
branch, made a commit and it's working. It's happening only on the releases/release-vX.X.X
Thanks for that info @theobolo . The refs are split by slash and the last element is used as the job name, but if the slash is part of the branch/tag name the split doesn't work correctly. Just made a new version and tested it against a branch with a slash and it worked. Will push the fix to another PR and if that one is building correctly I will create a new release.
Released version 1.0.14 with the fix. Please let me know if this version works so we can close this issue.
@sanderv32 Very well done ! It's working now :) Great Thanks
You can close this issue