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

13 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge 347f472b03
[jenkins] Improve error reporting a bit. (#4646)
We keep track of the current stage by using the 'currentStage' variable, so that we can properly report what failed.

There were a couple of problems with this:

* The 'Package Xamarin.Mac tests' is not a fatal step, which means that the
  pipeline will continue executing even if it fails. In this case the previous
  code would assign any failure to package the XM tests to the last stage
  ('Test docs').

* Something similar seems to happen if there are failures in the Xamarin.Mac
  tests executed in parallel (on other bots), where any failure would be
  reported as a failure in the last stage ('Test docs').

* No support for reporting failure in multiple stages.

So do a couple of things:

* Clear out the 'currentStage' variable at the end, and handle it being empty
  when reporting results. This should solve at least some of the problems
  where blame as being assigned incorrectly (we'll probably run into cases
  where blame isn't assigned at all, but this is still half the way of getting
  it right).

* Add a 'failedStages' variables where we can keep track of (and report)
  multiple failed stages.
2018-08-21 09:55:07 +02:00
Rolf Bjarne Kvinge 0ede8b07bc
[jenkins] Implement support for slack notifications. (#4369)
Implement support for slack notifications.

Notifications will only be sent when something fails, and unfortunately I wasn't able to make notifications ping due to https://github.com/jenkinsci/slack-plugin/issues/353.
2018-08-03 11:37:54 +02:00
Rolf Bjarne Kvinge 0181606fce
[jenkins] Skip any executing builds on internal jenkins when new builds are scheduled for pull requests. (#4518) 2018-08-02 09:53:46 +02:00
Rolf Bjarne Kvinge a125bcce4a Rewrite a bit to get around sandbox. 2018-07-05 08:52:01 +02:00
Rolf Bjarne Kvinge 1a76ef7419 Fix typos. 2018-07-04 20:57:42 +02:00
Rolf Bjarne Kvinge 1ee5aae8b7 [jenkins] Create a blacklist of macOS versions to skip testing on, and add some documentation. 2018-07-04 18:43:25 +02:00
Rolf Bjarne Kvinge badfc700bb [jenkins] Run more tests on additional macOS versions (introspection, linksdk, linkall and xammac_tests).
Also add Mojave (10.14) to the additional macOS versions.
2018-07-03 16:53:29 +02:00
Rolf Bjarne Kvinge 38ac83a43f
[jenkins] Make it possible to run internal jenkins tests on pull requests. (#4334)
Add support for the 'run-internal-tests' label on pull requests to indicate
that the internal jenkins should run tests when that label is applied.

Also make it so that either the 'run-internal-tests' or the 'build-package'
label will actually make the internal jenkins execute (otherwise the 'run-
internal-tests' label would also require the 'build-package' label, which
wouldn't be very obvious/user-friendly).
2018-06-28 14:58:30 +02:00
Rolf Bjarne Kvinge 345ccdec9c
[jenkins] Make the Jenkins-built packages the official ones. (#4283) 2018-06-18 17:15:57 +02:00
Rolf Bjarne Kvinge 2aaee04e56
[Jenkins] Publish bundle.zip and msbuild.zip as GH statuses as well. (#4238) (#4280)
This also requires a maccore bump.

* xamarin/maccore@30c28d1469 [release] Rename bundlefull.zip to bundle.zip. (#848)

Diff: f274834136...30c28d1469
2018-06-18 07:54:42 +02:00
Rolf Bjarne Kvinge dccbc5a74b [jenkins] Skip docs testing unless on master. 2018-06-14 10:31:24 +02:00
Rolf Bjarne Kvinge 9cdaf2b753 [jenkins] Cherry-pick a series of fixes for internal jenkins support from the d15-8 branch (#4195)
* [Jenkins] Create artifacts.json and set a GH status as 'Jenkins: Artifacts'.

* [jenkins] Include the url in artifacts.json

* [jenkins] Add sha256 checksum to artifacts.json as well.

* [Jenkins] Enable xamarin before provisioning so that we auto-provision Xcode.

* [jenkins] Fix passing flags to configure.

Quoting empty CONFIGURE_FLAGS ends up doing this:

    ./configure "" --disable-ios-device

and since configure parses arguments until it finds an empty argument, it
would stop parsing at the first argument, effectively not disabling the device
build.

So don't quote CONFIGURE_FLAGS when invoking configure. shellcheck doesn't
quite like this, but the better code is much more complex, and not really
needed, so just add an exception.
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge ae7c72cba8 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-12 14:37:03 +02:00