mappjzc opened a new pull request, #4435:
URL: https://github.com/apache/incubator-devlake/pull/4435
### Summary
Add bamboo plugin
Add connection for bamboo
`.vscode/.bb_connection_post.sh`
```bash
#!/bin/sh
curl --location --request POST 'devlake:8080/plugins/bamboo/connections' \
--header 'Content-Type: application/json' \
--data-raw '
{
"name":"test-bamboo",
"endpoint":"http://[shield]/rest/api/latest/",
"token":"[shield]"
}
'
echo "\r\n"
```
```
{
"name": "test-bamboo",
"id": 1,
"createdAt": "2023-02-16T13:55:55.405Z",
"updatedAt": "2023-02-16T13:55:55.405Z",
"endpoint": "http://[shield]/rest/api/latest/",
"proxy": "",
"rateLimitPerHour": 0,
"token": "[shield]"
}
```
`.vscode/.bb_connection_patch.sh`
```bash
#!/bin/sh
curl --location --request PATCH 'devlake:8080/plugins/bamboo/connections/1' \
--header 'Content-Type: application/json' \
--data-raw '
{
"name":"test-bamboo",
"endpoint":"http://[shield]/rest/api/latest/",
"token":"[shield]"
}
'
echo "\r\n"
```
```
{
"name": "test-bamboo",
"id": 1,
"createdAt": "2023-02-16T13:55:55.405Z",
"updatedAt": "2023-02-16T13:55:55.405Z",
"endpoint": "http://[shield]/rest/api/latest/",
"proxy": "",
"rateLimitPerHour": 0,
"token": "[shield]"
}
```
`.vscode/.bb_connection_gets.sh`
```bash
#!/bin/sh
curl --location --request GET 'devlake:8080/plugins/bamboo/connections' \
--header 'Content-Type: application/json' \
--data-raw '
{
}
'
echo "\r\n"
```
```
[{
"name": "test-bamboo",
"id": 1,
"createdAt": "2023-02-16T13:55:55.405Z",
"updatedAt": "2023-02-16T13:55:55.405Z",
"endpoint": "http://[shield]/rest/api/latest/",
"proxy": "",
"rateLimitPerHour": 0,
"token": "[shield]"
}]
```
`.vscode/.bb_connection_get.sh`
```bash
#!/bin/sh
curl --location --request GET 'devlake:8080/plugins/bamboo/connections/1' \
--header 'Content-Type: application/json' \
--data-raw '
{
}
'
echo "\r\n"
```
```
{
"name": "test-bamboo",
"id": 1,
"createdAt": "2023-02-16T13:55:55.405Z",
"updatedAt": "2023-02-16T13:55:55.405Z",
"endpoint": "http://[shield]/rest/api/latest/",
"proxy": "",
"rateLimitPerHour": 0,
"token": "[shield]"
}
```
`.vscode/.bb_connection_test.sh` `ok`
```bash
#!/bin/sh
curl --location --request POST 'devlake:8080/plugins/bamboo/test' \
--header 'Content-Type: application/json' \
--data-raw \
'{
"endpoint":"http://[shield]/rest/api/latest/",
"token":"[shield]"
}'
echo "\r\n"
```
```json
{
"success": true,
"message": "success",
"causes": null,
"Connection": {
"endpoint": "http://[shield]/rest/api/latest/",
"proxy": "",
"rateLimitPerHour": 0,
"token": "[shield]"
}
}
```
`.vscode/.bb_connection_test.sh` `fail`
```bash
#!/bin/sh
curl --location --request POST 'devlake:8080/plugins/bamboo/test' \
--header 'Content-Type: application/json' \
--data-raw \
'{
"endpoint":"http://[shield]/rest/api/latest/",
"token":"hello"
}'
echo "\r\n"
```
```json
{
"success": false,
"message": "unexpected status code: 401 (401)",
"causes": null
}
```
### Screenshots













--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]