r-bar / concourse-github-status

A concourse resource type for checking and setting build statuses on github
MIT License
0 stars 4 forks source link

version is missing from previous step #1

Open warezWally opened 2 years ago

warezWally commented 2 years ago

Hi,

Understand you've not done a commit to this since 2020. But I'm trying to use your resource in Concourse 7.7.1 as a simple test im trying to apply a status to the branch used in the pipeline. But recieve the following error in the "in/get" script:

image

Here is a truncated version of my pipeline.yml

resources:
  - name: gitcontents
    type: git
    icon: github
    check_every: 15s
    source:
      uri: https://((REPOSITORY.GIT))/((REPOSITORY.OWNER))/((REPOSITORY.REPO)) 
      branch: ((BRANCH))
      password: ((gittoken))
      username: "gittoken@((REPOSITORY.GIT))"
  - name: build-status
    type: github-status
    source:
      owner: ((REPOSITORY.OWNER))
      repository: ((REPOSITORY.REPO))
      access_token: ((gittoken))

resource_types:
  - name: github-status
    type: docker-image
    source:
      repository: "registry.barth.tech/library/github-status-resource" # +
      tag: latest

jobs:
  - name: test
    plan:
      - put: build-status
        params: { state: success, commit: gitcontents }

I'm guessing the check code in this resource is not returning a value that concourse is happy with. Help is appreciated

r-bar commented 1 year ago

If I had to take a guess the contract for the OutParams has changed on the concourse side and now requires that version key. You would have to update the contract here and update the .from_build() constructor accordingly.

If you are able to provide some more detailed debug info I would be happy to help further. The biggest issue for updating this for you is I no longer have access to a running concourse instance to test against. The company I hacked this up for let me go back in 2020.