Skip to content

Updates to envvars for CI build to support VSTS automation #1872

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

Merged
merged 2 commits into from
Jun 7, 2018

Conversation

d3r3kk
Copy link

@d3r3kk d3r3kk commented Jun 5, 2018

Extend const IS_CI_SERVER from src/test/constants.ts to include new constant IS_VSTS, represented by the environment variable TF_BUILD present on VSTS.

  • Set MochaOpts.useColor=false to take into account VSTS's lack of support for this.

Helps #934

This pull request:

  • Has a title summarizes what is changing
  • Includes a news entry file (remember to thank yourself!)
  • Works on all actively maintained versions of Python (e.g. Python 2.7 & the latest Python 3 release)
  • Works on Windows 10, macOS, and Linux (e.g. considered file system case-sensitivity)

@d3r3kk d3r3kk requested a review from DonJayamanne June 5, 2018 20:51
@d3r3kk d3r3kk self-assigned this Jun 5, 2018
@d3r3kk
Copy link
Author

d3r3kk commented Jun 5, 2018

Spawn a new build...

@d3r3kk d3r3kk reopened this Jun 5, 2018
@codecov
Copy link

codecov bot commented Jun 5, 2018

Codecov Report

Merging #1872 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1872      +/-   ##
==========================================
+ Coverage   74.44%   74.46%   +0.02%     
==========================================
  Files         282      282              
  Lines       13253    13253              
  Branches     2382     2382              
==========================================
+ Hits         9866     9869       +3     
+ Misses       3257     3253       -4     
- Partials      130      131       +1
Impacted Files Coverage Δ
src/client/debugger/Main.ts 51.85% <0%> (-0.5%) ⬇️
src/client/debugger/mainV2.ts 79.91% <0%> (+2%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7f48a19...6753b27. Read the comment docs.

@d3r3kk d3r3kk closed this Jun 6, 2018
@d3r3kk
Copy link
Author

d3r3kk commented Jun 6, 2018

Try this out on the new CI definition in VSTS...

@d3r3kk d3r3kk reopened this Jun 6, 2018
@d3r3kk d3r3kk closed this Jun 6, 2018
@d3r3kk
Copy link
Author

d3r3kk commented Jun 6, 2018

Another crack at VSTS CI

@d3r3kk d3r3kk reopened this Jun 6, 2018
@d3r3kk d3r3kk closed this Jun 6, 2018
@d3r3kk
Copy link
Author

d3r3kk commented Jun 6, 2018

Once again...

@d3r3kk d3r3kk reopened this Jun 6, 2018
@d3r3kk d3r3kk closed this Jun 7, 2018
@d3r3kk
Copy link
Author

d3r3kk commented Jun 7, 2018

Once again...

@d3r3kk d3r3kk reopened this Jun 7, 2018
@d3r3kk
Copy link
Author

d3r3kk commented Jun 7, 2018

@DonJayamanne this change actually doesn't seem to have any effect at all. If you look here at the code, and then search the 'testSingleWorkspace' output for that test, you can see the IS_CI_SERVER value is being completely ignored. Perhaps this is due to a shortcoming on the VSTS side, I'll check it out further... but maybe how I've used the environment variable is to blame?

@d3r3kk d3r3kk closed this Jun 7, 2018
@DonJayamanne
Copy link

DonJayamanne commented Jun 7, 2018

Agreed, something wrong in VSTS, cuz it works as expected on Travis and appveyor

- case insensitive value was failing my use case
- VSTS tooling only tests this way too
@d3r3kk
Copy link
Author

d3r3kk commented Jun 7, 2018

I found it. The VSTS env var TF_BUILD is set to "True" in true MSBuild style.

My expression was failing due to case mismatch!

I found that in the VSTS tooling it is enough to test for the existance of the TF_BUILD environment variable so I've decided to follow that pattern. (I doubt very much a VSTS build agent would ever define that value as "False" or anything else...).

@d3r3kk d3r3kk reopened this Jun 7, 2018
@d3r3kk
Copy link
Author

d3r3kk commented Jun 7, 2018

@DonJayamanne yep this fixes it! I'm shoving it in... will watch it and revert tonight if it turns out problematic...

@d3r3kk d3r3kk merged commit 4767b3f into microsoft:master Jun 7, 2018
@d3r3kk d3r3kk deleted the tf_ci branch June 7, 2018 19:19
@lock lock bot locked as resolved and limited conversation to collaborators Jul 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants