[Bug] Cannot use output parameter due to it being hardcoded by task
See original GitHub issueMoved from https://github.com/GitTools/GitVersion/issues/2473
Describe the bug Running gitversion with /output file parameter gets overwritten. Actually it gets overwritten twice with two different parameters - json and buildserver.
C:\hostedtoolcache\windows\GitVersion.Tool\5.5.1\x64\dotnet-gitversion.exe D:/a/1/s /output json /output buildserver /config /output file
Expected Behavior
Being able to specify intended output, perhaps as parameter
Actual Behavior
buildserver output type gets precedence over both json and file outputs
Possible Fix
Expose output as parameter
Steps to Reproduce
Create task that will save GitVersion.json file using /output file parameter
Context
I’m not able to create json artifact to reuse it in other jobs
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
When using input parameters, output string ... - GitHub
Given a task that writes a string to some file and then returns that string as an output parameter, if non-hardcoded input parameters...
Read more >Unable to pass output parameters from one workflowTemplate ...
For example, the no-parameters template here does not produce an output, even though it invokes a template which does have an output.
Read more >Difference between Connector tab Output parameter vs Input ...
So you need to make it available as a process variable in the calling process instance (process instance with two service tasks). Output...
Read more >Cannot use result map service because output parameter ...
The result map service used to draw the results of a task requires output to be written to disk. It cannot be written...
Read more >in and out variables - whats the difference - Ask TOM
5/2 PLS-00363: expression 'X' cannot be used as an assignment target 5/2 PL/SQL: Statement ignored. An IN OUT parameter can not only be...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hello @quasarea. I forgot to say thanks for the info on the default file name (GitVersion.json).
Hello @quasarea. I just ran a GitHub actions test to verify the above. It all worked as expected (it created output variables in JSON format, it created outputs for the GitHub build agent and it output the version variables to a specified file, which I proved by displaying the contents of the file in a separate step.
Snippet from action:
See GitHub workflow file for full details.