-
Notifications
You must be signed in to change notification settings - Fork 899
Azure Pipelines build and release pipeline #1621
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
Comments
That sounds great to me! No need for three systems when one can handle everything. |
I'd like to do this :) Would you still like to keep your cmd and sh scripts to build and test or shall I replace that with yml steps? If I use the yml steps I can also upload the test results (with code coverage) to the build summary. Also, what do you want to do with Coverity and Coveralls? The use for Coveralls could go away since the Azure Pipeline would be able to contain your code coverage. Coverity could (if you like) be replaced with SonarCloud. You mentioned that you would like to upload the results of the build to Azure Artifacts, why would you want this instead of publishing them as regular build artifacts and using those in your release definition? EDIT: You can view my progress on my Azure DevOps project. For now I'm using the visual editor but I'll export it to a yml pipeline once I'm done. |
How are the paths set during testing? I'm running into the issue that the tests pretty much run on no platform. For example, on Windows I'm getting issues like:
While the file is actually in
I have the same issue if I manually run the tests on my machine. Also, what's up with the |
Sorry, in what context? How are you running them? They run fine for me locally (via xunit runner) and in AppVeyor, Travis and Azure Pipelines. The existing Azure Pipelines build is here, which reads the existing azure-pipelines.yml to do a build. This should be a good start. Curious what's different about your setup from the one that's in place? |
Sorry for the slow response! I execute commands using the Azure DevOps tasks instead of running the current script. The script is in my opinion not the preferred way of building/testing because the integration with Azure DevOps is very limited. Right now there are a lot of tests that are failing: On Windows a lot of Unix related tests seem to run (and fail). On Linux the following command is executed:
And that's causing all tests to fail such as:
I would expect that a |
Being able to run the scripts locally is a huge help in creating a reproducible CI system - debugging failures on a CI server is hard. If you can run the same script locally that the CI server runs, it's a lot easier. Obviously things like uploading test results will need to be a unique task, but using the "build" and "run my test" task is not necessarily a big win. For libgit2 itself, we have a straightforward setup: run the build script, then run the test script. Additional steps (like the test results upload) run the Azure Pipelines tasks, but the core building happens in a script so that it's easy to understand. In any case:
What's are you setting the current working directory to when you start this process? Can you share your yaml? |
I'm not setting the current working directory. It's using the default value (for example: c:\agent_work\1\s). I understand that you want the same experience locally as on your build server, but I think it's odd that the 'regular' commands to restore, build and test the project don't work. They also don't work on my own machine. (workingdirectory = root of the repo on my disk) My yaml file (generated) is: resources:
- repo: self
phases:
- phase: Phase_1
displayName: Windows
condition: succeeded()
queue:
name: Hosted VS2017
demands:
- msbuild
- visualstudio
- vstest
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.7.1'
inputs:
versionSpec: 4.7.1
- task: NuGetCommand@2
displayName: 'NuGet restore'
- task: VSBuild@1
displayName: 'Build solution **\*.sln'
- task: VSTest@2
displayName: 'VsTest - testAssemblies'
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '**/*.sln'
enabled: false
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: '**/*Tests.csproj'
enabled: false
- phase: Phase_2
displayName: Linux
condition: succeeded()
queue:
name: Hosted Ubuntu 1604
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: restore
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: LibGit2Sharp.Tests
arguments: ' -f netcoreapp2.0 /property:ExtraDefine="LEAKS_IDENTIFYING" /fl /flp:verbosity=detailed'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
arguments: '-f netcoreapp2.0 --no-restore --no-build '
- phase: Phase_3
displayName: Mac
condition: succeeded()
queue:
name: Hosted macOS
steps:
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
projects: '**/*.sln'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: '**/*Tests.csproj' |
Do they work if you set the I agree that this should work correctly "out of the box" - PRs welcome. |
With the latest changes, it goes a lot better already :) |
At present, we have a mix of build systems that I would like to unify.
I'd like to standardize around Azure Pipelines. At the moment, it's only doing a build for validation. I would like the build step to:
Then I'd like to have a separate release pipeline that will:
The text was updated successfully, but these errors were encountered: