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
Pipeline parameters misinterpretation #11707
Comments
Oh sorry I forgot to describe my environment:
|
@Deunze It's not clear what the question is. Do you mind showing some real snippets from the config and explaining what is happening? |
I have this configuration for the first pipeline:
So as described it must store artifacts files in "Build/{Runtime}/Release".
But when build materials are stored in the working directory of the pipeline I have a bad sub directory construction: |
I was able to replicate the behavior with the below configuration:
After running the pipeline, I could see below folder created under artifact directory:
Here are the logs from go-agent logs for the same job:
Job console log output:
|
I was able to replicate this behaviour across all OS. Later, when I tried uploading artifact using the create artifact API (https://api.gocd.org/current/#create-artifact) was unable to replicate the issue. Pipeline Configuration:
API call:
However, when I appended the path using API call:
|
This is a bug in urlrewrite, similar to this one. This call causes this problem when passed in a string with braces in it. FunctionReplacer.replace("escape:{runtime}/release/abcd") => "{runtime/release/abcd}" ... because it has a regex which is not greedy. The matching filter in GoCD code is: gocd/server/webapp/WEB-INF/urlrewrite.xml Line 602 in 0ba4950
Replacing @ketan might know more. |
@Deunze Easiest thing currently would be to remove the braces for now. Even by changing/escaping that path, it looks like it'll not get the right path. |
It does fix, but introduces other problems, don't recall what those were. |
Thanks guys, |
Hello,
I'm faced with an issue related to pipeline parameters and artifacts parameters:
I have two pipelines. The first one is executed after a new revision of code (pulling). The second one use artifacts as build materials of the first pipeline.
In the first I have to collect artifacts and for that I use Build artifact parameter on a job:
Source: #{WORKING_DIRECTORY}/{Runtime}/Release/*.dll
Destination: Build/{Runtime}/Release
In the second pipeline directories are not created correctly. In fact I have:
Build/{Runtime/Release}
I was try several techniques to try to escape special chraracters ({}) but not succeed to resolve this.
The #{WORKING_DIRECTORY} is filled with a folder name. I don't see anything relevant about it in the documentation.
So my question is why the path is transformed in {Runtime/Release}? Is it a bug in parameters parsing of GoCD or we have to escape folders like {Runtime} in the other manner?
The text was updated successfully, but these errors were encountered: