github-release-resource
github-release-resource copied to clipboard
Not downloading the newest files
I have a pipeline similar to ci.concourse.ci
.
After creating a RC version it builds the source, uploads to github release, builds helm charts and merges with github release binaries, uploads both charts and binaries -> deploys.
When I just rebuild the charts and upload them to the github release the deploy step always deploys the old charts. When I download the charts manually from github to check, they are actually the correct, new charts.
Is there any cache for resources in concourse? Maybe something is wrong with my pipeline. Not sure.
serial: true
plan:
- aggregate:
- get: source
passed: [rc]
trigger: true
- get: version
passed: [rc]
trigger: true
- aggregate:
- task: build
- name: build-charts
serial: true
plan:
- aggregate:
- get: source
passed: [build]
trigger: true
- get: charts
trigger: true
- get: version
passed: [build]
trigger: true
- get: rc
passed: [build]
trigger: true
- task: build-charts
- put: github-release
...
- name: deploy-rc
serial: true
interruptible: true
plan:
- aggregate:
- get: source
passed: [build-charts]
- get: version
passed: [build-charts]
trigger: true
- get: config
passed: [config-smoke-test]
trigger: true
- get: rc
passed: [build-charts]
trigger: true
params:
globs:
- '*-chart.tgz'
- deploy
Is your release resource checking for draft releases?
I'm working through a problem right now where my draft releases are told to deliver the code for the release, but the actual code obtained by the resource is from the previous release and not the release that triggered the action.
My guess is that the resource can't find the archive on the draft resource, so it gets the most recent archive instead.
- name: draft-pre-release
type: github-release
source:
owner: me
repository: my-app
access_token: ((github-token))
drafts: true
release: false
pre_release: true
Looking at the code snippet above, it seems that you’re passing the same version between your jobs, so I wouldn’t expect the built artefact from the build job in the deploy job. Remove passed
from the resource in the deploy job.
I am seeing a similar issue (with current github-release-resource), but can't quite tell if it is the same one.
When calculating the timestamp, we only look at the published and created times for the release, and ignore any asset time stamps. This means that, for example, if a release is created (as a draft), then assets are uploaded in a separate task, that will never be reflected in the resource. Even though the in
step would get different data, as far as concourse is concerned the metadata (from check
) is the same and therefore it doesn't need to redo the in
.