Comments (5)
Hi @yangxxx28 it looks like you are sending a test event that doesn't contain all the information required by the Lambda to connect to the Bitbucket server. Try to test with a real event from Bitbucket.
from aws-codepipeline-bitbucket-integration.
@alexfrosa I made some code changes to the bitbucket. Here is the webhook event.
I think the event should be able to trigger lambda correctly?
from aws-codepipeline-bitbucket-integration.
@yangxxx28 the lambda is expecting events of changes to the repo code.
from aws-codepipeline-bitbucket-integration.
@alexfrosa I did make code changes and pushed to the bitbucket server. Below is the request:
{
"resource": "/",
"path": "/",
"httpMethod": "POST",
"headers": {
"Accept": "/",
"Content-Type": "application/json; charset=UTF-8",
"Host": "t5t3vyclwj.execute-api.ap-southeast-2.amazonaws.com",
"User-Agent": "Atlassian HttpClient 2.1.0 / Bitbucket-7.4.0 (7004000) / Default",
"Via": "1.1 localhost (Apache-HttpClient/4.5.5 (cache))",
"X-Amzn-Trace-Id": "Root=1-5f9231d7-7559a8e27dc3b2fd33409552",
"X-Event-Key": "repo:refs_changed",
"X-Forwarded-For": "52.147.3.51",
"X-Forwarded-Port": "443",
"X-Forwarded-Proto": "https",
"X-Hub-Signature": "sha256=d36d0cf272a14319a926add61d879fcc3ab851e7b24e58a9103f4c0602e5e326",
"X-Request-Id": "13efc8c6-0be4-44f7-949d-5617a5dd31a4"
},
"multiValueHeaders": {
"Accept": [
"/"
],
"Content-Type": [
"application/json; charset=UTF-8"
],
"Host": [
"t5t3vyclwj.execute-api.ap-southeast-2.amazonaws.com"
],
"User-Agent": [
"Atlassian HttpClient 2.1.0 / Bitbucket-7.4.0 (7004000) / Default"
],
"Via": [
"1.1 localhost (Apache-HttpClient/4.5.5 (cache))"
],
"X-Amzn-Trace-Id": [
"Root=1-5f9231d7-7559a8e27dc3b2fd33409552"
],
"X-Event-Key": [
"repo:refs_changed"
],
"X-Forwarded-For": [
"52.147.3.51"
],
"X-Forwarded-Port": [
"443"
],
"X-Forwarded-Proto": [
"https"
],
"X-Hub-Signature": [
"sha256=d36d0cf272a14319a926add61d879fcc3ab851e7b24e58a9103f4c0602e5e326"
],
"X-Request-Id": [
"13efc8c6-0be4-44f7-949d-5617a5dd31a4"
]
},
"queryStringParameters": null,
"multiValueQueryStringParameters": null,
"pathParameters": null,
"stageVariables": null,
"requestContext": {
"resourceId": "06qc5tsqr1",
"resourcePath": "/",
"httpMethod": "POST",
"extendedRequestId": "U1y5rFD5SwMF9fw=",
"requestTime": "23/Oct/2020:01:28:55 +0000",
"path": "/prod",
"accountId": "474830832708",
"protocol": "HTTP/1.1",
"stage": "prod",
"domainPrefix": "t5t3vyclwj",
"requestTimeEpoch": 1603416535442,
"requestId": "06ade38a-518a-4625-828a-aefbb549b162",
"identity": {
"cognitoIdentityPoolId": null,
"accountId": null,
"cognitoIdentityId": null,
"caller": null,
"sourceIp": "52.147.3.51",
"principalOrgId": null,
"accessKey": null,
"cognitoAuthenticationType": null,
"cognitoAuthenticationProvider": null,
"userArn": null,
"userAgent": "Atlassian HttpClient 2.1.0 / Bitbucket-7.4.0 (7004000) / Default",
"user": null
},
"domainName": "t5t3vyclwj.execute-api.ap-southeast-2.amazonaws.com",
"apiId": "t5t3vyclwj"
},
"body": "{"eventKey":"repo:refs_changed","date":"2020-10-23T12:28:54+1100","actor":{"name":"xxx","emailAddress":"[email protected]","id":266,"displayName":"xxx xxx","active":true,"slug":"xxx","type":"NORMAL","links":{"self":[{"href":"https://bitbucket.xxx.xxx.xx:7990/users/yxio"}]}},"repository":{"slug":"image_python_data_platform","id":12,"name":"image_python_data_platform","hierarchyId":"1756db2651d9f6d65828","scmId":"git","state":"AVAILABLE","statusMessage":"Available","forkable":true,"project":{"key":"ADL","id":22,"name":"AWS Data Lake","public":false,"type":"NORMAL","links":{"self":[{"href":"https://bitbucket.xxx.xxx.xx:7990/projects/ADL"}]}},"public":false,"links":{"clone":[{"href":"ssh://[email protected]:7999/adl/image_python_data_platform.git","name":"ssh"},{"href":"https://bitbucket.xxx.xxx.xx:7990/scm/adl/image_python_data_platform.git","name":"http"}],"self":[{"href":"https://bitbucket.xxx.xxx.xx:7990/projects/ADL/repos/image_python_data_platform/browse"}]}},"changes":[{"ref":{"id":"refs/heads/master","displayId":"master","type":"BRANCH"},"refId":"refs/heads/master","fromHash":"993fcd5b758df782d6382a535db9361427757e6a","toHash":"ed329b5102bc5ddfb84c97dae4c54320e862fefd","type":"UPDATE"}]}",
"isBase64Encoded": false
}
from aws-codepipeline-bitbucket-integration.
Hi @yangxxx28, please check if the Lambda environment variable BITBUCKET_SERVER_URL matches your server URL like https://bitbucket.xxx.xxx.xx:7990. Error 404 means it is not finding the content in the Bitbucket server defined by this environment variable.
from aws-codepipeline-bitbucket-integration.
Related Issues (17)
- BitBucket Server webhook - error 500 HOT 9
- BitBucket Server Unreachable while connecting HOT 6
- Getting 403 Error during creation of LambdaFunction HOT 4
- License inconsistent HOT 2
- Bitbucket webhook is failing to upload the source code to api gateway HOT 2
- Getting 403 from Lambda function but not using a regular SOAP UI/Postman request HOT 1
- My Webhook doesn't trigger aws codepipeline ( on certain occasions ) HOT 2
- Error creating lambda function with cloudformation stack HOT 1
- Missing Output for API GW? HOT 2
- Error: Request failed with status code 401 HOT 2
- whenever i pushed the code to my repo in Bitbucket, event is getting triggers. But in Lambda logs getting the error "proxy: undefined"
- The CF template uses a lambda which runs on Node Js 14.x runtime which is already deprecated. Can you guys please update this to Node 20.x HOT 2
- Question: Why do we need an option for Application Load Balancer? HOT 2
- Getting 403 from Bitbucket Server Webhook test HOT 3
- S3 Bucket Error HOT 1
- LBSubnet error while EndpointType is API Gateway HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-codepipeline-bitbucket-integration.