-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add Azure Pipelines CI #2299
Add Azure Pipelines CI #2299
Conversation
This is actually something I've been considering. I won't have any time today to dig in but I'll try to find time soon. Can you remove the package-lock file that was generated? I haven't yet added the npmrc file that stops them from being generated. |
Whoops, didn't realized I'd added that, taken care of 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damccorm thanks for submitting this! I'm really excited about getting azure pipelines set up. I have a few comments/questions.
.azure-pipelines-steps.yml
Outdated
|
||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFiles: '**/xunit.xml' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So azure pipelines only speaks xunit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With this input it does, but it can also use JUnit, NUnit, VSTest, xUnit, or cTest, we'd just need to change testResultsFiles to something like **/junit.xml
. I believe if we want we could also do something like **/TEST-**.xml
, this input really just works as a pattern matcher I think.
I used xunit since that matches the custom reporter I added (more on that below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@damccorm It looks like mocha (even the version we use) ships with an XUnit reporter. Can we just use that? We can have an azure
script that does mocha --async-only --reporter xunit
That way we can drop the extra reporter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh actually, on closer inspection, this doesn't get written to a file which is necessary for us to report results. We can pipe it out to a file, but that would mean we would get no output at all on the console.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the -O output=test.xunit
flag to specify the output file. I was thinking we could just run the test suites as separate phases, one with the spec reporter and one with the xunit reporter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me! Updated accordingly
@damccorm Just a few more things I followed up on. Also, do you have any guidance on how I signup and get this configured to work under a gulpjs organization for Azure Pipelines? |
Oh, also - does Azure Pipelines support a |
Sure, I moved it in there in my PR.
The easiest way to get this done is probably to install the GitHub app after you've merged in this PR. That will walk you through the process of creating an organization and project. From there you can follow the getting started docs here. One thing to call out is that since we moved the yaml to the Let me know if anything is unclear as well, happy to help however I can! |
One more thing - I noticed that both the organization names Regardless, installing the GitHub app is still the best way to get going. |
@damccorm yeah, I did set one up a long time ago but I gave up when I ran into tons of XML. Is the YAML stuff new?
|
Yeah, it was added a little more than half a year ago as the default experience. It was part of a larger push (which is still ongoing) to offer a better OSS experience in particular.
Yep! It should give you an opportunity to sign into an existing organization. |
Sorry for the delay. This is looking great! |
@damccorm I'm looking at the docs for secure variables and it seems to indicate there should be a 🔒 icon in the variables panel but I don't have that. How do I secure this coveralls token? Also, by using the coveralls token as a secure token, it says it won't be available to PRs - won't that break our coveralls Status API integration for PRs? |
@damccorm thanks for following up. I have totally different variables view than you. Is it possible that I'm on a newer/older version of the UI because I signed up so long ago? I also noticed that other stuff in the documentation didn't match my UI. |
@damccorm this is what I'm seeing for my "variables" screen |
Huh, that's weird, I haven't seen that view before (I joined Pipelines relatively recently though, so there's a chance it predates me). One thing that you could do is check to make sure the new UI didn't somehow get disabled in the preview features. For me you can access this here, hopefully this works for you as well: |
The Change
This PR adds Azure Pipelines to perform CI builds and PR builds. Pipelines offers several key advantages:
Disclaimer
Full disclosure, I'm an engineer on the Pipelines team, but I also think Pipelines provides some pretty significant advantages here.
Additional Info
You can see that this works in my pipeline.
With test reporting!