Concourse github-release resource cannot find older versions or tags

旧时模样 提交于 2020-01-15 08:17:10

问题


I'm trying to pull an older version/tags of a git hub release in my Concourse pipeline using the github-release-resource, but it does not seem to be able to find releases other than the latest one though.
Here is the simple test where we try to extract an older release of concourse itself.

---
resources:
- name: concourse-release
  type: github-release
  source:
    user: concourse
    repository: concourse
    access_token: YOUR-GITHUB-ACCESS-TOKEN-GOES-HERE
jobs:
- name: test-concourse-release
  plan:
  - do:
    - get: concourse-release
      version: { tag: 'v2.4.0' }
    - task: test-release
      config:
        platform: linux
        image_resource:
          type: docker-image
          source:
            repository: ubuntu
        inputs:
        - name: concourse-release
        run:
          path: sh
          args:
          - -exc
          - |
            find .
            cat ./concourse-release/tag
            cat ./concourse-release/version

The resource output for the task above is:

waiting for a suitable set of input versions
concourse-release - pinned version {"tag":"v2.4.0"} is not available

even though the release exists: https://github.com/concourse/concourse/releases/tag/v2.4.0

How can I get that to work?


回答1:


According to Concourse documentation, newly configured resources will only start from the latest version.

You have to use the fly CLI with command check-resource in order to have an older version of the resource downloaded.

For example, for the sample pipeline listed in the question, this would be the command to retrieve the older version (v2.4.0) of Concourse and make it available for the pipeline execution:

fly -t <your-target-alias> check-resource --resource <your-pipeline-name>/concourse-release --from tag:v2.4.0


来源:https://stackoverflow.com/questions/41108427/concourse-github-release-resource-cannot-find-older-versions-or-tags

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!