Hello!
I’ve been using drone internally at my company for several months and am starting to migrate my open source projects to cloud.drone.io
I’m having a problem with my build not running on tag events.
It looks like webhooks is being rejected, but not for a reason that makes sense.
Please let me know if there is something more I need to adjust for this to start working.
Thanks in advance for all your help!
-Andy
.drone.yml
clone:
git:
image: plugins/git
pipeline:
install:
image: node:6
commands:
- npm i
node6:
group: test
image: node:6
commands:
- npm test
node7:
group: test
image: node:7
commands:
- npm test
node8:
group: test
image: node:8
commands:
- npm test
node9:
group: test
image: node:9
commands:
- npm test
node10:
group: test
image: node:10
commands:
- npm test
node11:
group: test
image: node:11
commands:
- npm test
publish:
image: node:10
commands:
- echo "//registry.npmjs.org/:_authToken=$${NPM_DEPLOY_TOKEN}" > ~/.npmrc
- echo "unsafe-perm=true" >> ~/.npmrc
- npm publish
secrets:
- npm_deploy_token
when:
event: tag
branch:
- include: [ v* ]
Here’s the webhook post that was sent:
Headers:
Request URL: https://cloud.drone.io/hook
Request method: POST
content-type: application/json
Expect:
User-Agent: GitHub-Hookshot/60c6631
X-GitHub-Delivery: e57d7ca0-1025-11e9-86a1-c3b717587c46
X-GitHub-Event: push
X-Hub-Signature: sha1=c48ba070c49bbdfa7c2d96172af0c78b559911d1
Body:
{
"ref": "refs/tags/v0.2.1",
"before": "0000000000000000000000000000000000000000",
"after": "744113f178862a1081ae0184f481e061d92375ba",
"created": true,
"deleted": false,
"forced": false,
"base_ref": null,
"compare": "https://github.com/terodox/argument-contracts/compare/v0.2.1",
"commits": [
],
"head_commit": {
"id": "26534ce320872692a7311d8b359dc0b9c8a59da1",
"tree_id": "a1b2706cb19ff7e110b1fdd469f606c1c0c1ea59",
"distinct": true,
"message": "0.2.1",
"timestamp": "2019-01-04T08:37:32-05:00",
"url": "https://github.com/terodox/argument-contracts/commit/26534ce320872692a7311d8b359dc0b9c8a59da1",
"author": {
"name": "terodox",
"email": "terodox@gmail.com",
"username": "terodox"
},
"committer": {
"name": "terodox",
"email": "terodox@gmail.com",
"username": "terodox"
},
"added": [
],
"removed": [
],
"modified": [
"package-lock.json",
"package.json"
]
},
"repository": {
"id": 129319292,
"node_id": "MDEwOlJlcG9zaXRvcnkxMjkzMTkyOTI=",
"name": "argument-contracts",
"full_name": "terodox/argument-contracts",
"private": false,
"owner": {
"name": "terodox",
"email": "andy.desmarais@meltwater.com",
"login": "terodox",
"id": 4835893,
"node_id": "MDQ6VXNlcjQ4MzU4OTM=",
"avatar_url": "https://avatars3.githubusercontent.com/u/4835893?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/terodox",
"html_url": "https://github.com/terodox",
"followers_url": "https://api.github.com/users/terodox/followers",
"following_url": "https://api.github.com/users/terodox/following{/other_user}",
"gists_url": "https://api.github.com/users/terodox/gists{/gist_id}",
"starred_url": "https://api.github.com/users/terodox/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/terodox/subscriptions",
"organizations_url": "https://api.github.com/users/terodox/orgs",
"repos_url": "https://api.github.com/users/terodox/repos",
"events_url": "https://api.github.com/users/terodox/events{/privacy}",
"received_events_url": "https://api.github.com/users/terodox/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/terodox/argument-contracts",
"description": "A small and simple library for asserting argument are the correct types",
"fork": false,
"url": "https://github.com/terodox/argument-contracts",
"forks_url": "https://api.github.com/repos/terodox/argument-contracts/forks",
"keys_url": "https://api.github.com/repos/terodox/argument-contracts/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/terodox/argument-contracts/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/terodox/argument-contracts/teams",
"hooks_url": "https://api.github.com/repos/terodox/argument-contracts/hooks",
"issue_events_url": "https://api.github.com/repos/terodox/argument-contracts/issues/events{/number}",
"events_url": "https://api.github.com/repos/terodox/argument-contracts/events",
"assignees_url": "https://api.github.com/repos/terodox/argument-contracts/assignees{/user}",
"branches_url": "https://api.github.com/repos/terodox/argument-contracts/branches{/branch}",
"tags_url": "https://api.github.com/repos/terodox/argument-contracts/tags",
"blobs_url": "https://api.github.com/repos/terodox/argument-contracts/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/terodox/argument-contracts/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/terodox/argument-contracts/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/terodox/argument-contracts/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/terodox/argument-contracts/statuses/{sha}",
"languages_url": "https://api.github.com/repos/terodox/argument-contracts/languages",
"stargazers_url": "https://api.github.com/repos/terodox/argument-contracts/stargazers",
"contributors_url": "https://api.github.com/repos/terodox/argument-contracts/contributors",
"subscribers_url": "https://api.github.com/repos/terodox/argument-contracts/subscribers",
"subscription_url": "https://api.github.com/repos/terodox/argument-contracts/subscription",
"commits_url": "https://api.github.com/repos/terodox/argument-contracts/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/terodox/argument-contracts/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/terodox/argument-contracts/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/terodox/argument-contracts/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/terodox/argument-contracts/contents/{+path}",
"compare_url": "https://api.github.com/repos/terodox/argument-contracts/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/terodox/argument-contracts/merges",
"archive_url": "https://api.github.com/repos/terodox/argument-contracts/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/terodox/argument-contracts/downloads",
"issues_url": "https://api.github.com/repos/terodox/argument-contracts/issues{/number}",
"pulls_url": "https://api.github.com/repos/terodox/argument-contracts/pulls{/number}",
"milestones_url": "https://api.github.com/repos/terodox/argument-contracts/milestones{/number}",
"notifications_url": "https://api.github.com/repos/terodox/argument-contracts/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/terodox/argument-contracts/labels{/name}",
"releases_url": "https://api.github.com/repos/terodox/argument-contracts/releases{/id}",
"deployments_url": "https://api.github.com/repos/terodox/argument-contracts/deployments",
"created_at": 1523573310,
"updated_at": "2019-01-04T13:35:20Z",
"pushed_at": 1546609055,
"git_url": "git://github.com/terodox/argument-contracts.git",
"ssh_url": "git@github.com:terodox/argument-contracts.git",
"clone_url": "https://github.com/terodox/argument-contracts.git",
"svn_url": "https://github.com/terodox/argument-contracts",
"homepage": null,
"size": 257,
"stargazers_count": 0,
"watchers_count": 0,
"language": "JavaScript",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"open_issues_count": 0,
"license": null,
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "master",
"stargazers": 0,
"master_branch": "master"
},
"pusher": {
"name": "terodox",
"email": "[Redacted]"
},
"sender": {
"login": "terodox",
"id": 4835893,
"node_id": "MDQ6VXNlcjQ4MzU4OTM=",
"avatar_url": "https://avatars3.githubusercontent.com/u/4835893?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/terodox",
"html_url": "https://github.com/terodox",
"followers_url": "https://api.github.com/users/terodox/followers",
"following_url": "https://api.github.com/users/terodox/following{/other_user}",
"gists_url": "https://api.github.com/users/terodox/gists{/gist_id}",
"starred_url": "https://api.github.com/users/terodox/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/terodox/subscriptions",
"organizations_url": "https://api.github.com/users/terodox/orgs",
"repos_url": "https://api.github.com/users/terodox/repos",
"events_url": "https://api.github.com/users/terodox/events{/privacy}",
"received_events_url": "https://api.github.com/users/terodox/received_events",
"type": "User",
"site_admin": false
}
}
Here’s the response:
HTTP Status Code
500
Headers:
Cache-Control: no-cache, no-store, must-revalidate, private, max-age=0
Content-Length: 83
Content-Type: application/json
Date: Fri, 04 Jan 2019 13:39:26 GMT
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Pragma: no-cache
Strict-Transport-Security: max-age=315360000
X-Accel-Expires: 0
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block
Body:
{"message":"No commit found for the ref 744113f178862a1081ae0184f481e061d92375ba"}