I have a repo with multiple python packages inside. Each of them run in a different jenkins pipeline. These pipelines are always triggered from bitbucket using a webhook. I want to make adjustments to not run the pipelines when there are no changes to the folder of the package. I also dont want it to show as not build, for clarity I want to see the status of the last time it ran. The webhook is sending this in the body
<code>{
"date": "2024-07-23T14:15:15+0200",
"actor": {
...
},
"toCommit": {
"committer": {
...
},
"committerTimestamp": 1721736909000,
"author": {
...
},
"authorTimestamp": 1721736909000,
"id": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"displayId": "eecf1f7634d",
"message": "working on generic triggers",
"parents": [{
"committer": {
...
},
"committerTimestamp": 1721734828000,
"author": {
...
},
"authorTimestamp": 1721734828000,
"id": "3dbe0065576c54a39764d870d85cb19163179d2e",
"displayId": "3dbe0065576",
"message": "working on generic triggers",
"parents": [{
"id": "3c53d71bf061dfa886b2c7c6d87ccb6b552334ec",
"displayId": "3c53d71bf06"
}]
}]
},
"eventKey": "repo:refs_changed",
"changes": [{
"ref": {
"id": "refs/heads/main",
"displayId": "main",
"type": "BRANCH"
},
"fromHash": "3dbe0065576c54a39764d870d85cb19163179d2e",
"toHash": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"refId": "refs/heads/main",
"type": "UPDATE"
}],
"commits": [{
"committer": {
...
},
"committerTimestamp": 1721736909000,
"author": {
...
},
"authorTimestamp": 1721736909000,
"id": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"displayId": "eecf1f7634d",
"message": "working on generic triggers",
"parents": [{
"id": "3dbe0065576c54a39764d870d85cb19163179d2e",
"displayId": "3dbe0065576"
}]
}],
"repository": {
"archived": false,
"public": false,
"hierarchyId": "2639ba89f5b657028469",
"name": "smart_charging_api",
"forkable": true,
"project": {
"public": false,
"name": ...,
"links": {"self": [{"href": ...}]},
"id": 2631,
"type": "NORMAL"
},
"links": {
"clone": [...
],
"self": [{"href": ...}]
},
"id": 4684,
"scmId": "git",
"state": "AVAILABLE",
"statusMessage": "Available"
}
}
</code>
<code>{
"date": "2024-07-23T14:15:15+0200",
"actor": {
...
},
"toCommit": {
"committer": {
...
},
"committerTimestamp": 1721736909000,
"author": {
...
},
"authorTimestamp": 1721736909000,
"id": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"displayId": "eecf1f7634d",
"message": "working on generic triggers",
"parents": [{
"committer": {
...
},
"committerTimestamp": 1721734828000,
"author": {
...
},
"authorTimestamp": 1721734828000,
"id": "3dbe0065576c54a39764d870d85cb19163179d2e",
"displayId": "3dbe0065576",
"message": "working on generic triggers",
"parents": [{
"id": "3c53d71bf061dfa886b2c7c6d87ccb6b552334ec",
"displayId": "3c53d71bf06"
}]
}]
},
"eventKey": "repo:refs_changed",
"changes": [{
"ref": {
"id": "refs/heads/main",
"displayId": "main",
"type": "BRANCH"
},
"fromHash": "3dbe0065576c54a39764d870d85cb19163179d2e",
"toHash": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"refId": "refs/heads/main",
"type": "UPDATE"
}],
"commits": [{
"committer": {
...
},
"committerTimestamp": 1721736909000,
"author": {
...
},
"authorTimestamp": 1721736909000,
"id": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"displayId": "eecf1f7634d",
"message": "working on generic triggers",
"parents": [{
"id": "3dbe0065576c54a39764d870d85cb19163179d2e",
"displayId": "3dbe0065576"
}]
}],
"repository": {
"archived": false,
"public": false,
"hierarchyId": "2639ba89f5b657028469",
"name": "smart_charging_api",
"forkable": true,
"project": {
"public": false,
"name": ...,
"links": {"self": [{"href": ...}]},
"id": 2631,
"type": "NORMAL"
},
"links": {
"clone": [...
],
"self": [{"href": ...}]
},
"id": 4684,
"scmId": "git",
"state": "AVAILABLE",
"statusMessage": "Available"
}
}
</code>
{
"date": "2024-07-23T14:15:15+0200",
"actor": {
...
},
"toCommit": {
"committer": {
...
},
"committerTimestamp": 1721736909000,
"author": {
...
},
"authorTimestamp": 1721736909000,
"id": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"displayId": "eecf1f7634d",
"message": "working on generic triggers",
"parents": [{
"committer": {
...
},
"committerTimestamp": 1721734828000,
"author": {
...
},
"authorTimestamp": 1721734828000,
"id": "3dbe0065576c54a39764d870d85cb19163179d2e",
"displayId": "3dbe0065576",
"message": "working on generic triggers",
"parents": [{
"id": "3c53d71bf061dfa886b2c7c6d87ccb6b552334ec",
"displayId": "3c53d71bf06"
}]
}]
},
"eventKey": "repo:refs_changed",
"changes": [{
"ref": {
"id": "refs/heads/main",
"displayId": "main",
"type": "BRANCH"
},
"fromHash": "3dbe0065576c54a39764d870d85cb19163179d2e",
"toHash": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"refId": "refs/heads/main",
"type": "UPDATE"
}],
"commits": [{
"committer": {
...
},
"committerTimestamp": 1721736909000,
"author": {
...
},
"authorTimestamp": 1721736909000,
"id": "eecf1f7634d9c0ccb1c7e48e7ea14e822197f77a",
"displayId": "eecf1f7634d",
"message": "working on generic triggers",
"parents": [{
"id": "3dbe0065576c54a39764d870d85cb19163179d2e",
"displayId": "3dbe0065576"
}]
}],
"repository": {
"archived": false,
"public": false,
"hierarchyId": "2639ba89f5b657028469",
"name": "smart_charging_api",
"forkable": true,
"project": {
"public": false,
"name": ...,
"links": {"self": [{"href": ...}]},
"id": 2631,
"type": "NORMAL"
},
"links": {
"clone": [...
],
"self": [{"href": ...}]
},
"id": 4684,
"scmId": "git",
"state": "AVAILABLE",
"statusMessage": "Available"
}
}
What are the options to do this?
I tried the generic-webhook-trigger, but the changes do not seam to appear in the body of the webhook.