Code Monkey home page Code Monkey logo

bitrise-step-bitbucket-server-post-build-status's People

Contributors

bilal-a-ahmad avatar buju77 avatar markst avatar teameh avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

bitrise-step-bitbucket-server-post-build-status's Issues

0.0.10

Hi,
0.0.9...0.0.10

I think the change on the .sh broke the step:

Post build status: INPROGRESS
API Endpoint: https://XXXrest/build-status/1.0/commits/140339f7c80ca55a05c1d103fa93614debe7f085
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   395    0   157  100   238    225    342 --:--:-- --:--:-- --:--:--   567
100   395    0   157  100   238    225    342 --:--:-- --:--:-- --:--:--   567
HTTP/2 400 
10:14:07 GMT; Path=/; SameSite=None; Secure
x-arequestid: *1K01GK3x614x5599151x0
x-asen: SEN-11558268
x-auserid: 159
x-ausername:XXXX
cache-control: no-cache, no-transform
vary: accept-encoding,x-auserid,cookie,x-ausername,accept-encoding
x-content-type-options: nosniff
content-encoding: gzip

{"errors":[{"context":null,"message":"Please specify a valid state (valid states: {SUCCESSFUL,FAILED,INPROGRESS})","exceptionName":null},{"context":null,"message":"Please specify a valid url","exceptionName":null}]}|                                                                              |
+---+---------------------------------------------------------------+----------+
| โœ“ | [email protected]                        | 5.78 sec |
+---+---------------------------------------------------------------+----------+

Bitrise App name contains white spaces causing the curl command to fail

With our project, the title of our App contained white spaces. When changing those to dashes, the command succeeded.

Logging errors:

+------------------------------------------------------------------------------+

| (0) bitbucket-server-post-build-status                                       |
+------------------------------------------------------------------------------+
| id: bitbucket-server-post-build-status                                       |
| version: 0.0.9                                                               |
| collection: https://github.com/bitrise-io/bitrise-steplib.git                |
| toolkit: bash                                                                |
| time: 2020-03-09T09:42:57Z                                                   |
+------------------------------------------------------------------------------+
|                                                                              |
Post build status: SUCCESSFUL
API Endpoint: https://******/rest/build-status/1.0/commits/******
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   318    0   232  100    86    321    119 --:--:-- --:--:-- --:--:--   322
HTTP/1.1 400 
Server: nginx
Date: Mon, 09 Mar 2020 09:42:59 GMT
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
X-AREQUESTID: ******
X-ASEN: ******
X-AUSERID: ******
X-AUSERNAME: ******
Cache-Control: no-cache, no-transform
Vary: accept-encoding,x-auserid,cookie,x-ausername,accept-encoding
X-Content-Type-Options: nosniff
Content-Encoding: gzip
Set-Cookie: MRHSession=80cb64a2eb141a8a10f4d5e08ea34316; expires=Mon, 09 Mar 2020 21:42:59 GMT; domain=******;path=/;secure
Set-Cookie: LastMRH_Session=80cb64a2eb141a8a10f4d5e08ea34316; expires=Mon, 09 Mar 2020 21:42:59 GMT; domain=******;path=/;secure

{"errors":[{"context":null,"message":"Unexpected end-of-input in VALUE_STRING\n at [Source: com.atlassian.stash.internal.web.util.web.CountingServletInputStream@399e4490; line: 4, column: 114]","exceptionName":"org.codehaus.jackson.JsonParseException"}]}curl: (6) Could not resolve host: Lab
curl: (3) [globbing] unmatched close brace/bracket in column 132

Please check:
curl: (6) Could not resolve host: Lab

Our app name:
NS Lab (iOS)

Support for using personal access token

Instead of username and password, bitbucket server rest api also supports the use of personal access token. Just need to include them in the authorization header. I can contribute and create a PR if you'd like

Aborted builds can't send a status to update the pull request

Since the new integration of the multiple build statuses on a Pull Request, a new issue was found on our workflows.

Once a build gets aborted, it is unable to send any notification to the Bitbucket server to update the status. Meaning that on the next run the build gets a new build number and is unable to post and update the previous build status. Stacking up builds with in-progress statuses.

Proposed solution
To fix it, I would like to suggest making the key customizable. By default, it would be "Bitrise" and if you have one or more separate workflows you can give them ur own identifier.

$GIT_CLONE_COMMIT_HASH cant be trusted as post build status target

When using the Git Clone repository plugin while enabling the config Limit fetching to the specified number of commits, returns output for $GIT_CLONE_COMMIT_HASH on a commit which was never pushed. At least from what I see, you are on HEAD.

When sending the status to Bitbucket, it succeeds but doesn't do anything. As there is no PR bind to this commit.

I think a solution would be to use the environment variable $BITRISE_GIT_COMMIT instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.