Can you please help me with one of the queries.
I have a task running some powershell script. There is a variable being used inside the script and its value is coming out to be 0 or 1.
Basis on this variable output within the script, I need to do source checkout (another task) depending on "Add condition to task ".
I tried bamboo inject variable method but its not helping either as this will not work with injected variables, but only with plan or global ones
Hello @Abhishek kaushik
Task conditioners work normally with Injected variables. Can you demonstrate how you are exporting, importing and consuming those variables?
Exported variables will derive from a Java properties format key=value. Eg.
Best regards,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
Hi @Eduardo Alvarenga ,
I tried the similar steps but the source code checkout is not getting triggered as in the logs as it says "skipping task because of unfulfilled condition."
One thing i noticed is there are some weird special characters showing in the logs, is this expected or happening because of file formatting. I am doing echo "EXITCODE=$LASTEXITCODE" > EXITCODE.txt) in my powershell script
Injected variable bamboo.exitcodeinject.??E�X�I�T�C�O�D�E�=�0� in LOCAL scope
Injected variable bamboo.exitcodeinject.�= in LOCAL scope
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Abhishek kaushik
This is a well-known issue with character encoding on Windows Please check this bug for a workaround:
I recommend you mark yourself as affected and also watch that bug to be notified when the final fix is implemented.
Best regards,
Eduardo Alvarenga
Atlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Eduardo Alvarenga
I was able to do the source code checkout basis on above. However, UTF-8 was still showing weird special characters but when converted to ascii, it fixed everything. Here is my fix
echo EXITCODE=$LASTEXITCODE | Out-File -FilePath <File location with filename> -Encoding ascii
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Good job @Abhishek kaushik!
Make sure to Accept the solution provided if you were able to get the issue sorted.
Eduardo Alvarenga
Atlassian Support APAC
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.