Giter VIP home page Giter VIP logo

Comments (5)

idr0id avatar idr0id commented on July 29, 2024

Hi,

Yes we use this resource for our self-hosted server and I assume that API of self-hosted and cloud versions are the same.

I will be glad if you fix up that. Thanks!

from concourse-git-bitbucket-pr-resource.

philicious avatar philicious commented on July 29, 2024

not sure which Bitbucket Server version you are using ? but the API endpoints aswell as result is slightly different. However I got the check fixed already.

But the in is still failing for me now

using version of resource found in cache
Cloning into '/tmp/build/get'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Its weird that I get a host key verification error as cloning works for other git resources ?!

my manual tests yield this as output of in and look good, no?

{
  "version": {
    "id": "1",
    "branch": "feature/MOQ2MVP-161-this-is-a-test-for-pull-requ",
    "commit": "02fa53df59fa",
    "updated_at": "2017-06-23T13:19:18.367406+00:00"
  },
  "metadata": [
    {
      "name": "url",
      "value": "https://bitbucket.org/!api/2.0/repositories/FOO/BAR/pullrequests/1"
    },
    {
      "name": "author",
      "value": "Phil"
    },
    {
      "name": "commit",
      "value": "02fa53df59fa"
    },
    {
      "name": "feature-branch",
      "value": "feature/MOQ2MVP-161-this-is-a-test-for-pull-requ"
    },
    {
      "name": "upstream-branch",
      "value": "develop"
    }
  ]
}

and the git_payload in in looks like this

{ "source": { "uri": "[email protected]:foo/bar.git", "branch": "feature/MOQ2MVP-161-this-is-a-test-for-pull-requ" }, "version": { "ref": "02fa53df59fa" } }

Maybe you have an idea what the problem might be ?

from concourse-git-bitbucket-pr-resource.

philicious avatar philicious commented on July 29, 2024

lol nevermind got it working shortly after I posted. the private_key param for the git resource was wrongly indented in the pipeline.yml

so the pipeline is working now and building the PR branch :)

I will do some more testing and do a PR then.

e.g. seeing this error on the second check. first one succeeded

resource script '/opt/resource/check []' failed: exit status 3

stderr:
jq: error: syntax error, unexpected IDENT, expecting ';' or ')' (Unix shell quoting issues?) at <top-level>, line 8:
        | map(select(.updated_at >= 2017-06-23T13:19:18.367406+00:00))                                              
jq: 1 compile error
(23) Failed writing body

from concourse-git-bitbucket-pr-resource.

philicious avatar philicious commented on July 29, 2024

@idr0id check and in are working great for me now with Bitbucket Cloud. I also fixed up out to set the build status, which is also working.

However, I noticed a problem: setting the build status on a commit will also update the updated_on field for a PR and this will trigger the check again to emit a new version. And then you end up in an infinite build-loop.

I havent found a solution for this yet. I guess we could compare the commit hash in check and if its equal to previous checks version, fake/override the updated_at with previous one, so we dont emit a new version.

What do you think? Have you also noticed that problem or is the updated_on field not changed with Bitbucket Server in that case ? (updated_on = updatedDate for Bitbucket Server)

from concourse-git-bitbucket-pr-resource.

idr0id avatar idr0id commented on July 29, 2024

@philicious thanks for investigations %)

We are using the obsolete self-hosted version 4.1.3. I didn't assumed that guys from Atlassian didn't make backward compatibility to newest versions.

check is working very well for us, setting the build status for commit will not affect to update time of PR.

I think that your proposal is sounds very good.

from concourse-git-bitbucket-pr-resource.

Related Issues (20)

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.