Skip to content
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

Unable to set build variables conditionally using this task #3

Open
gandhiprachi opened this issue Jul 6, 2018 · 0 comments
Open

Comments

@gandhiprachi
Copy link

Repro steps
I have a shell script like this
abort=true
if [ "$BUILD_SOURCEBRANCH" = "master" ] || [ $isCi = "1" ]; then
abort=false
fi
echo $abort
if [ "$abort" = true ]; then
echo "##vso[task.complete result=Canceled;]"
echo "##vso[task.setvariable variable=agent.jobstatus;]canceled"
fi

Actual Result
When abort = true, i see the correct behavior and the step and build are canceled.
When abort=false, i see that the step is marked as canceled even though build doesn't halt.

Expected Result
When abort=false, step shouldn't be canceled.

I see shell script source is printed before tempexecution.sh executes. I wonder if this printing of echo commands has something to do with this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant