-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Fixes to the CI document #1556
Fixes to the CI document #1556
Conversation
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.
Thanks @blackdwarf. Some quick edit notes for you. I'll review this more thoroughly later on.
After this, you will be given an option to configure the repository that you wish to build as well as what queue to use for this build. After you select the needed options, you will be directed to the actual build definition. Here, you will be able to add a build step, as shown in the screenshot below: | ||
|
||
![Adding a build step](media/vsts-screens/screen_4.png) |
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.
rename the folder vsts-screens to the name of the topic
This document outlines the usage of .NET Core SDK and its tools on the build server. In general, on a CI build server, | ||
you want to automate the installation in some way. The automation, ideally, should not require administrative | ||
privileges if at all possible. | ||
This document outlines the usage of .NET Core SDK and its tools on the build server. When we started building the .NET Core SDK and its command-line tools, we have envisioned the toolset being able to be used both interactivelly, by a human being sitting at a command line, as well as automatically, that is by a CI server. The commands, options, inputs and outputs would be the same and the only thing you would add on top is a way to acquire the tooling as well as choosng how to do your build. |
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.
typos:
- interactivelly
- choosng
For SaaS CI solutions, there are several options. This document will cover two very popular ones, [TravisCI](https://travis-ci.org/) and | ||
[AppVeyor](https://www.appveyor.com/). There are, of course, many other services out there, but the installation and | ||
usage mechanisms should be similar. | ||
The document will focus on various scenarios of acqusition of the tools and show the tools that we built to help with that. We will then delve into some reccomendations on how to design and structure your build scripts themselves. |
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.
typos:
- acqusition
- reccomendations
install a system-wide version of the SDK, which may be desired; if it's not, you should look into the | ||
[installer script usage](#using-the-installer-script) outlined below. | ||
### Using the native installers | ||
Native installers are available for MacOS, Windows and Ubuntu (in the form of DEB files and a dedicated apt-get feed). They have the following characteristics: |
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.
macOS
Ubuntu or `yum` for CentOS, or using the packages themselves (that is, DEB or RPM). The former would require setting up the | ||
feed that contains the packages. | ||
* They require admin (sudo) access to the build server. | ||
* For Ubuntu, the apt-get feed allows native depencenies to be acquired at the same time the tools are acquired. |
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.
typo: depencenies
|
||
#### Using a manual script | ||
Taking the script we have started above and using it in VSTS is very simple. You can create a new build definition and then specify |
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.
specify what?
Taking the script we have started above and using it in VSTS is very simple. You can create a new build definition and then specify | ||
|
||
First, start by creating a new build definition. Once you get the screen that gives you an option to define what kind of a build you wish to create, click on the "Empty" option as the |
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.
Remove all these extra words for First, After, etc...
Just list the steps in sequence
UI options are styled as bold
2. Use the .NET Core command-line commands | ||
|
||
Which to use should be decided mostly based on how familar and comfortable you are with each of the mentioned ways. For example, MSBuild can give you access to expressing your build(s) as tasks and targets, but it comes with an added complexity of learning MSBuild project-file syntax. On the other hand, using just the .NET Core command-line tools could be simpler but it would require you to write orchestration logic (for example, change into directory with project 1 and run `dotnet build`, then change to directory with project 2 and again run `dotnet build` etc.) in some scripting language like `bash` or PowerShell. |
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.
Always use the plural form of a noun rather than adding (s).
typo: familar
Which to use should be decided mostly based on how familar and comfortable you are with each of the mentioned ways. For example, MSBuild can give you access to expressing your build(s) as tasks and targets, but it comes with an added complexity of learning MSBuild project-file syntax. On the other hand, using just the .NET Core command-line tools could be simpler but it would require you to write orchestration logic (for example, change into directory with project 1 and run `dotnet build`, then change to directory with project 2 and again run `dotnet build` etc.) in some scripting language like `bash` or PowerShell. | ||
|
||
The choice here is dependent on familiarity; some people are more comfortable using more familiar languages like shell scripts while others are well-versed in MSBuild projects and have no problems using them. |
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.
This is kind of repeating the last paragraph
![Specifying the PowerShell script to run](media/vsts-screens/screen_6_ps.png) | ||
|
||
Here, you can select the script you've created and committed to source control. After this is done, you can save the build definition and try it out by enquining it. From that moment on, you are good to go. |
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.
typo: enquining
@mairaw pls take a look. @enricosada will update the PR to add the new AppVeyor script that uses manual install of the newest bits. |
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.
I'll add updated travis/appveyor, downloading and invoking install script, because is best option atm
@@ -74,12 +127,14 @@ The [travis-ci](https://travis-ci.org/) can be configured to install the .NET Co | |||
Just use: | |||
|
|||
```yaml | |||
dotnet: 1.0.0-preview2-003121 | |||
dotnet: 1.0.0-rc4-0044771 | |||
``` | |||
|
|||
Travis can run both `osx` (OS X 10.11) and `linux` ( Ubuntu 14.04 ) job in a build matrix, see [example .travis.yml](https://github.com/dotnet/docs/blob/master/.travis.yml) |
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.
@mairaw @blackdwarf you can specify what osx you want to use (also do a build matrix on that) with normal travis conf, so let's use the default in these docs, and travis users can customize as usual ref travis docs
A really good idea is also update directly the f#, c#, vb official travis docs with .net core support (at least a link to this document)
also afaik (up to two days ago), travis doesnt yet support rc4, ref travis-ci/travis-ci#7301 |
@blackdwarf added #1599 with cleanup appveyor/travis for rc4 |
* use install script in build matrix * add travis docs, and template * travis, add custom install using install script
@enricosada I've added support for RC* in Travis with travis-ci/travis-build#968 that was merged yesterday or on Wed. |
@mairaw are you ok for this going in? |
@@ -9,11 +9,21 @@ matrix: | |||
- os: osx # OSX 10.11 | |||
osx_image: xcode7.2 | |||
dotnet: 1.0.0-preview2-003121 |
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.
do we need to change these versions @enricosada?
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.
Yes. That should say 1.0.1
|
||
script: | ||
- dotnet --info | ||
# Run a new console app | ||
- mkdir -p "test/test-dotnet-new" && pushd "test/test-dotnet-new" | ||
- dotnet new |
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.
should probably be changed to dotnet new console
## - ps: (New-Object System.Net.WebClient).DownloadFile($url, $tempFile) | ||
## - ps: Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::ExtractToDirectory($tempFile, $env:DOTNET_INSTALL_DIR) | ||
## - ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" | ||
# NOTE .NET Core SDK preview2 is already installed in the build worker image Visual Studio 2015 |
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 would need to update these for vs 2017 correct?
I've made some improvements @blackdwarf but I still don't think this is ready. Here are the my questions now:
|
@mairaw comments:
|
@@ -9,11 +9,21 @@ matrix: | |||
- os: osx # OSX 10.11 | |||
osx_image: xcode7.2 | |||
dotnet: 1.0.0-preview2-003121 | |||
- os: osx # OSX 10.12 | |||
osx_image: xcode7.3 | |||
dotnet: 1.0.0-rc4-0044771 |
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.
Please CMIIW, but I think it's 0044771
-> 004771
.
It will work after travis-ci/travis-build#973 :)
@blackdwarf i have do it, the install:
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
- ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
- ps: Invoke-WebRequest -Uri "https://raw.codeproxy.net/dotnet/cli/rel/1.0.0/scripts/obtain/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1"
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version $env:CLI_VERSION -InstallDir $env:DOTNET_INSTALL_DIR'
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path" btw all that should be updated for 1.0 rtm i think. @blackdwarf all that should be updated with .net core tools 1.0.1 , i'll send a PR asap, checking locally because the channel is changed (btw the descript of |
@blackdwarf added some comment about dotnet-install script and docs in https://github.com/dotnet/cli/issues/5952 |
Replaced by #2161 |
Various fixes to the CI document.
Fixes #1454