-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow files to be used for bump and pre params #86
Conversation
I've unfortunately discovered that the |
Yep, this can only work in |
I'd like to have the resource plop the current version in for the pipeline to use without actually making writes to the backing source. This is useful to expose what the version will be in the UI before it actually happens, but also because I want to the artifacts to have been created with the appropriate and uploaded to their repository prior to actually writing the semver to the backing source. That's safest in my mind so that failed builds don't increment versions. But wanting the bump level to be determined dynamically makes my desire not fit into the I've started going down the road of specifying a "read only" param on the put/out that will do all the work except for writing to the backing source. I'm not sure how frowned upon that is since using a put in this way is probably breaking convention, but honestly it does exactly what I wanted get/in to do. |
Sounds like you're trying to use the |
I've updated this pull. My solution to fit within the rules of what Concourse currently allows with resources is to add a param that prevents semver from writing to the backend data source/driver during a With this change, my pipeline looks something like this:
Haven't quite figured out why I can't use relative paths for the EDIT: looks to be because the process runs without a current working directory curiously. I see the first argument is used as a join on the path. |
Signed-off-by: Matt Kulka <[email protected]>
Sorry but I don't think I can get behind that approach either. :/ This feels like it's going against what the resource interface is designed for and it really should just be a task, since you're intending to perform an action and get an output (the locally bumped version) without any side-effects. Performing a read-only As of right now I would feel more comfortable with expanding discussion around concourse/rfcs#7 rather than merging this in. This is one of our core resource types so it's important that we be somewhat strict about the patterns they encourage. Sorry again! |
Allowing
bump
andpre
params to be specified from files follows Concourse convention of passing data between resources by files. This will allow upstream tasks or resources to decide what the bump/pre level of a version should be.There's a fair amount of copy/paste here. I'm new to golang so I'm not sure what best practices I'm missing about DRY here.
Fixes #75