Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge dbe1051da4
Add support for building on Jenkins. (#4159)
Add support for building on internal Jenkins.

Jenkins has been configured to build every branch on xamarin/xamarin-macios that contains a `jenkins/Jenkinsfile`, which means it will start working as soon as this PR is merged.

Results will be posted as statuses on each commit, which can be viewed using the url `https://github.com/xamarin/xamarin-macios/commits/<branch>`:

![screenshot 2018-06-01 11 12 57](https://user-images.githubusercontent.com/249268/40832932-c3b05eb0-658c-11e8-9670-8de5fcc23407.png)

* The `continuous-integration/jenkins/branch` status links to the jenkins job.
* The other two are XI and XM packages (the `Jenkins-` prefix will be removed once we officially switch from Wrench to Jenkins).

More detailed information will be added as a comment to each commit, which can be seen by clicking on the commit and scrolling to the bottom (url of the format `https://github.com/xamarin/xamarin-macios/commit/<sha1>`)

![screenshot 2018-06-01 11 14 33](https://user-images.githubusercontent.com/249268/40833014-fd8772f4-658c-11e8-8a35-5df46bfb16c7.png)

Unfortunately GitHub does not display the commit statuses when viewing a single commit, so to view those statuses you'll have to view the list of commits (the `/commits/` url). Tip: it's possible to use `<sha1>` instead of `<branch>` (and vice versa for that matter) if you're interested in the statuses of a particular commit.

Pull requests will also be built (only from contributors with write access), but by default nothing will be done (the job will exit immediately, although a green check mark will still show up). Jenkins will **not** add a comment in the pull request in this case.

However, if the label `build-package` [1] is set for a pull request, the internal jenkins job will run (it will do everything except the local xharness test run: this includes creating and publishing packages, creating various diffs, run tests on older macOS versions, test docs, etc). A detailed comment will also be added to the pull request (see below for multiple examples), which means that there will be two Jenkins comments: one for the public Jenkins which builds every PR, and one for the internal Jenkins [2].

[1] I don't quite like the name of the label, because it doesn't get even close to explain all that will actually happen, but `run-on-internal-jenkins-and-create-package` is a bit too long IMHO... Also it's non-obvious that this is the label to apply if the reason for executing on the internal jenkins is some other reason (for instance to test a maccore bump). Other ideas:

* `run-internal-jenkins`: doesn't make it obvious that a package will be created (which is probably the most common reason to want to run on internal jenkins)
* We could have multiple labels that mean the same thing: `build-package`, `internal-build`, `run-internal-jenkins`, etc, but it's redundant and I don't quite like it either.
* Any other ideas?

[2] I'm noticing now that these two look quite similar and this might end up confusing (the main difference is that the comment from the public jenkins will say **Build success/failure** and **Build comment file:** at the top. If something goes wrong the failure will also show up differently). Should this be made clearer?
2018-06-04 19:40:16 -04:00
Rolf Bjarne Kvinge e24a6f6816
[jenkins] Improve api/generator diff reporting to say if there were changes, and if they were breaking or not. (#4138)
For the api diff for this PR we now show:

* `🔥 breaking changes 🔥`: If there are any breaking changes in the api diff (for this PR).
* `please review changes`: If there are any non-breaking changes in the api diff.
* `no change`: If the api diff is empty.

For the generator diff we show:

* `only version changes`: If there were only changes related to version numbers (since the XI/XM version number is added to the generator, that version number will always show up as a diff when comparing the generated source code)
* `please review changes`: If anything other that version numbers changed in the generated source code.
2018-05-30 17:07:28 -04:00
Rolf Bjarne Kvinge c993da4c3b
[jenkins] Fix scripts to be shellcheck-happy. (#4148)
A few general categories of fixes:

* Sprinkle lots of quotes everywhere.
* Don't use environment variables in the format string to printf, instead pass them as arguments.
* Don't use backticks to execute commands (it's deprecated), use the new "$(...)" syntax instead.
2018-05-29 11:03:54 -04:00
Rolf Bjarne Kvinge 238eb94caa
[jenkins] Don't treat API/Generator diff failures as errors. (#4127)
This way such failures won't make the build show up as failed, which may cause
other tooling to behave differently (and non-optimal).
2018-05-25 05:36:59 -04:00
Rolf Bjarne Kvinge 35ea4630fc
[jenkins] Update the urls for html reports. (#4119)
* [jenkins] Update the urls for html reports.

The urls for html reports changed as a consequence of a Jenkins update [1], so
update how we construct the links accordingly.

See also:

* https://xamarinhq.slack.com/archives/C03CCJNR7/p1526646040000120
* https://xamarinhq.slack.com/archives/C03CCJNR7/p1526653512000249

[1] https://wiki.jenkins.io/display/JENKINS/HTML+Publisher+Plugin (update to v1.16)

* Remove extra closing parenthesis.
2018-05-24 09:04:14 -04:00
Rolf Bjarne Kvinge e0cdd02423
[jenkins] Make it possible to skip API comparison by applying a label to a pull request. (#3994)
Implement support for skipping API comparison by applying a label to a pull
request.

This also required some refactoring to move existing code to fetch the labels
for a pull request to a separate script.
2018-04-27 09:05:50 +02:00
Rolf Bjarne Kvinge d214f86078
[tools] Improve error reporting when trying to create API/generator diff for a pull request with conflicts. (#3966)
We can't create an API/generator diff for a pull request with conflicts, so
detect this scenario and show a better error than this (from #3961):

    Comparing the changes between origin/pr/3961/merge^1 and HEAD:
    fatal: ambiguous argument 'origin/pr/3961/merge^1..HEAD': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
    fatal: ambiguous argument 'origin/pr/3961/merge^1': unknown revision or path not in the working tree.
    Use '--' to separate paths from revisions, like this:
    'git <command> [<revision>...] -- [<file>...]'
2018-04-21 00:04:18 +02:00
Rolf Bjarne Kvinge d267a508d5
[jenkins] Don't succeed if something went wrong when creating API or generator diff. (#3865)
Ref: https://github.com/xamarin/xamarin-macios/pull/3855#issuecomment-378441993
2018-04-04 15:36:30 +02:00
Rolf Bjarne Kvinge 9d2a886f86
[jenkins] Create comment file for PR builds. (#3799)
* [jenkins] Create comment file for PR builds.
2018-04-02 14:49:03 +02:00
Rolf Bjarne Kvinge da7fbcb2df
Add scripts to calculate API diffs and generated code diff between the current build and another revision. (#3447) 2018-02-13 07:47:47 +01:00