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

173 Коммитов

Автор SHA1 Сообщение Дата
Rolf Bjarne Kvinge e23362854e
[tests] Add make target to manually launch a device test run for the current commit. (#7282)
* [tests] Add make target to manually launch a device test run for the current commit.

* Upload a manifest that can be found using only the hash, and use it to find the packages.
2019-11-07 22:41:24 +01:00
Connor Adsit 0f7213d481 Notarization tweaks (take 2) (#7287)
* Only notarize CI builds; timeout after 90 min

* Update jenkins/Jenkinsfile

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>

* Don't upload notarized pkgs if it fails

* Update jenkins/Jenkinsfile

Co-Authored-By: Manuel de la Pena <mandel@microsoft.com>
2019-10-24 07:48:50 +02:00
Rolf Bjarne Kvinge e919ae7f7a Revert "Only notarize CI builds; timeout after 90 min (#7280)"
This reverts commit cd396d63cc.
2019-10-23 08:10:47 +02:00
Connor Adsit cd396d63cc Only notarize CI builds; timeout after 90 min (#7280)
* Only notarize CI builds; timeout after 90 min

* Update jenkins/Jenkinsfile

Co-Authored-By: Rolf Bjarne Kvinge <rolf@xamarin.com>
2019-10-23 07:46:55 +02:00
Rolf Bjarne Kvinge 4e5a2a3fc2
Automatically build mono from source if any of the archives aren't available. (#7160)
* Automatically build mono from source if any of the archives aren't available.

* [jenkins] Show in the PR report if mono was built from source.

* [jenkins] Make sure we got everything after running configure.
2019-10-04 09:55:29 +02:00
Rolf Bjarne Kvinge 865571a58a We don't need python3 to run tests on older macOS versions. 2019-09-16 15:26:12 +02:00
Rolf Bjarne Kvinge 303aa0a649 Merge remote-tracking branch 'origin/xcode11' into master-xcode11 2019-09-13 18:35:18 +02:00
Rolf Bjarne Kvinge 0008c20abf
Implement notarization. (#6928)
* Add a dummy x86_64 slice to all our native libraries that don't have one. (#6848)

Apple's notarization tool has a bug where they incorrectly flag Mach-O
binaries without an x86_64 slice, so make sure all our libraries have one.

* Jenkinsfile notarization (#6869)

* Add in notarization script for xamarin.mac/xamarin.iOS

* Flatten the list to get rid of the braces

* Add in keychain password

* Add login.keychain back in to access codesigning certificates

* Always sign pkgs, upload notarized copies

* Enable ios notarization and make notarized pkgs public

* Make notarization non-fatal

* Publish GH statuses for notarized PKGs

* Don't forget to declare URI variables for notarized pkgs

* report proper package links

* [jenkins] Improve package reporting.

* Use dummy function name which our tests won't complain about.
2019-09-09 00:34:11 -07:00
Connor Adsit c384add291 Jenkinsfile notarization (#6869)
* Add in notarization script for xamarin.mac/xamarin.iOS

* Flatten the list to get rid of the braces

* Add in keychain password

* Add login.keychain back in to access codesigning certificates

* Always sign pkgs, upload notarized copies

* Enable ios notarization and make notarized pkgs public

* Make notarization non-fatal

* Publish GH statuses for notarized PKGs

* Don't forget to declare URI variables for notarized pkgs

* report proper package links

* [jenkins] Improve package reporting.
2019-09-02 03:35:14 -07:00
Rolf Bjarne Kvinge 7d891641c8
[jenkins] Don't trust brew to not fail when things are working fine. (#6757)
brew may fail to install 7z if 7z is already installed, so ignore any brew
failures when trying to install 7z.

If 7z really is non-functional on the machine, then it'll fail later anyway.
2019-08-13 15:44:16 +02:00
Rolf Bjarne Kvinge 22b8c8c169
[tests] Package Xamarin.Mac tests using 7z instead of zip. (#6583)
This makes the package 33% smaller (from 176mb to 117mb).
2019-07-22 00:30:14 -07:00
Rolf Bjarne Kvinge 121f04ce3d
[tests] Improve handling of permission dialogs. Fixes xamarin/maccore#1856. (#6544)
* macOS 10.15 starts putting up permission dialogs we can't automatically
  dismiss anymore, so start honoring the 'IncludeSystemPermissionTests' option
  for macOS tests.
* Improve the 'IncludeSystemPermissionTests' option to have three states: if
  set (either true or false), that takes precedence, but if not set, we now
  don't run any tests that require permission dialogs on macOS or on device if
  we're running in CI. Tests executed locally will still put up dialogs, both
  on macOS and on device.
* This needed a few changes to the html report, since the
  'IncludeSystemPermissionTests' is exposed in the UI and the code didn't
  handle the three different states.
* Update a few tests to check for permission to the contacts.

Fixes https://github.com/xamarin/maccore/issues/1856.
2019-07-12 07:05:57 -07:00
Rolf Bjarne Kvinge c3757f5551
Build mono from source by default in all scenarios, not just CI. (#6363)
Many people are running into problems building xcode11 because they have to
"./configure --disable-packaged-mono" first.

So disable the packaged mono by default (and add a way to enable it again
manually with "./configure--disable-packaged-mono=no").
2019-06-20 07:44:34 +02:00
Rolf Bjarne Kvinge e01096c6f7 Fix logic confusion. 2019-06-04 07:28:21 -07:00
Rolf Bjarne Kvinge 02d01451a0 Build mono from source for now. 2019-06-04 07:24:11 -07:00
Rolf Bjarne Kvinge 72d7a8ad9b Merge remote-tracking branch 'origin/master' into binary-artifacts 2019-05-30 07:25:03 +02:00
Rolf Bjarne Kvinge 215bda500e
Show better error when the mono archive isn't available. Fixes xamarin-macios/maccore#1655. (#6155)
* Show better error when the mono archive isn't available. Fixes xamarin-macios/maccore#1655.

Fixes https://github.com/xamarin/maccore/issues/1655.

* [jenkins] Show better build failure in the build report PR comment.
2019-05-29 05:57:49 -07:00
Rolf Bjarne Kvinge 2ac3008237 [jenkins] Ignore the 7z dependency when running tests on older macOS versions.
We don't need 7z installed to just run the tests.
2019-05-29 12:56:44 +02:00
Alexander Köplinger 48b3b82410 Merge remote-tracking branch 'upstream/master' into binary-artifacts
# Conflicts:
#	builds/Makefile
#	external/mono
2019-05-22 20:07:18 +02:00
Rolf Bjarne Kvinge 885ed0d4b9
[jenkins] Adjust global timeout. (#6092)
We have a 13-hour timeout for running the tests [1], but that won't work if
the timeout for the entire Jenkins pipeline is lower, so adjust the timeout
for the entire Jenkins pipeline to be more than the sum of all the nested
timeouts.

[1] 94fe39b118 (diff-68c8473bbe1d4346ecff3d74522a31f8R675)
2019-05-21 21:58:42 -07:00
Alexander Köplinger 247a6bf551 Switch to mono archive and remove submodule 2019-05-21 22:16:02 +02:00
Manuel de la Pena 94fe39b118
[XHarness] Do use the test dlls from the mono downloads. (#6055)
This updates the project generation. We cannot yet fully remove the submodule because:

* We are missing the xunit dlls which should be added in the SDK.
* We have not yet remove all the old style tests. Would make the PR huge, better to deal with it in a diff PR.
* The xunit CoreLib tests have issues loading all the tests, needs some extra work and again, the PR is already large.

Fixes: xamarin/maccore#1199
Fixes: xamarin/maccore#1204
Fixes: xamarin/maccore#1209
Fixes: xamarin/maccore#1510
2019-05-19 14:55:14 -07:00
Manuel de la Pena 81d6225eb7
[XHarness] Fix some issues in the BCL test generator. (#5938)
We had issues in the code that adds a type found in an assembly to
ensure that it was not removed by the linker. This resulted in some
assemblies having 0 tests.

Added the needed ignore for the corlib tests and system ones.
2019-05-11 12:03:38 +02:00
Rolf Bjarne Kvinge 1fce966233
[builds] Fix race condition when building device runtimes. (#5960)
* [builds] Fix race condition when building device runtimes.

We need to complete the corresponding cross builds first, because the cross
builds will also try to configure device builds, so we might end up with two
make processes trying to configure the same target simulatenously.

* [jenkins] Add support for building mono from source in pull requests by using labels.
2019-04-30 07:23:49 +02:00
Rolf Bjarne Kvinge 17fe95a820
[jenkins] Add support to build.sh for timing out the build. (#5952)
* [jenkins] Add support to build.sh for timing out the build.

* Test timeout support

* [jenkins] Tell the world what happened.

* [jenkins] Minor announcement fix + disable test mode.
2019-04-26 23:06:12 +02:00
Rolf Bjarne Kvinge bd457212d5
[tests] Add sample tester. (#5870)
* [tests] Add sample tester.

Add a unit project that looks for iOS/macOS/tvOS sample projects in several
repositories, and builds them all.

* [tests][sampletester] Remove known issue which has now been fixed.

* [tests] Only run sample tests on CI in Azure Devops.

* Remove the possibility of automatically running the sample tests with
  xharness (so the sample tests won't run on PR bots or internal bots when the
  'run-all-tests' label is added). It's still possible to run the sample tests
  manually from the xharness web UI.

* Automatically trigger the sample test run in Azure Devops if the
  'run-sample-tests' label is applied to a PR (and that PR is executed on
  internal Jenkins).

* Fix typo.

* Fix path.

* Verbose output to track down scheduling failure.

* Bump maccore to get improved debug spew.

Diff: f527c9c526..f89d74b165

* [tests][sampletester] Fix build for TodoWCF.
2019-04-25 17:18:43 +02:00
Rolf Bjarne Kvinge d4e41445a2
[jenkins] Set a 1h build timeout. (#5893)
Builds take approximately 30 minutes on a bot now, so 1 hour should be plenty.

This makes sure a 32-bit dialog doesn't waste 9h of bot time just sitting
there.
2019-04-12 19:06:04 +02:00
Vincent Dondain 86d1b42ad2 Merge branch 'xcode10.2' into master-merge-xcode10.2 2019-04-03 13:57:31 -04:00
Manuel de la Pena f5bd6bc38c
[Jenkins] When running tests on VSTS do specify a device type. (#5817) 2019-03-29 13:28:08 +01:00
Manuel de la Pena 1cb12aec0a
[Jenkins] Increase the Jenkins timeout since tests are taking longer now. (#5797) 2019-03-23 15:04:56 +01:00
Rolf Bjarne Kvinge 721127c7f2 Bump maccore for a provisioning fix. (#5783)
* Bump maccore for a provisioning fix.

Diff: 71a563c892...cd07e49961

* Get verbose output.
2019-03-20 17:22:00 +01:00
Rolf Bjarne Kvinge 3b89c618cd
Bump maccore to get update to bot provisioning. (#5727)
* Bump maccore to get update to bot provisioning.

Diff: 3105682752...f3034c261f

* [jenkins] Prepackaged macOS tests only need a custom keychain.
2019-03-07 16:04:35 +01:00
Tim Miller 567b60b4f4 Add Additional Metadata Generation During Builds (#5718)
Updates the jenkinsFile to include generating ci-checkout.json and dependency-info.json.

ci-checkout.json is a list of all of the repositories included in the workspace of the project and their respective hashs.

dependency-info.json includes all of the info in ci-checkout.json, as well as a scan of the containing cs/fsproj files and their containing package and project references.
2019-03-07 08:42:13 +01:00
Rolf Bjarne Kvinge 9168a63698
[tests] Adjust system check when running tests on older macOS versions (we don't need simulators) (#5713)
Fixes this warning:

    make: *** tools/siminstaller: No such file or directory.  Stop.
    Can't check if simulators are available, because siminstaller failed to build.
2019-03-05 17:18:18 +01:00
Rolf Bjarne Kvinge c02fdb8565 Xcode 10.2 requires macOS Mojave. 2019-01-28 06:19:26 +01:00
Rolf Bjarne Kvinge 4ea181e95b [jenkins] Don't execute the packaged XM tests on the main macOS version. (#5165)
* [jenkins] Don't execute the packaged XM tests on the main macOS version.

Don't execute the packaged XM tests on the main macOS version, since it's redundant.

It also prevents a potential test deadlock if all main bots are busy.

* Rework to make it show better in the Jenkins UI.
2019-01-28 06:17:56 +01:00
Rolf Bjarne Kvinge 83718c0b72
[jenkins] Try to give better information when api comparison / generator diff fails. (#5477) 2019-01-25 17:33:58 +01:00
Rolf Bjarne Kvinge 0075415c39
[xharness] Add support for GitHub authentication, and use it in Jenkins. (#5380)
This makes it much less probable to hit any rate limits, because authenticated
rate limits are much higher (5000 requests/hour vs 60 requests/hour).
2019-01-11 15:48:16 +01:00
Rolf Bjarne Kvinge 61bf0db817
[tests] Run tests-docs using xharness. (#5372)
Jenkins has a limitation where you can't mark a step a failure, it has to
*fail* to be reported as such.

This means that running multiple tests, and reporting a failure if any of
those tests fail is not possible.

We run into this with the normal test run + the docs tests; where we currently
don't show a red result in the UI if any of those fail.

So incorporate the test-docs step into xharness, so that we only have one
thing to in the Jenkinsfile, which makes it possible for us to fail the test
run step properly.

This also required a few upgrades to xharness to get more info for pull
requests, since the logic to enable the docs tests is a bit more complicated
than anything else we have (if the current branch (or the target branch for a
PR) is 'master' AND xamarin mode is enabled).
2019-01-10 16:43:02 +01:00
Rolf Bjarne Kvinge 03d2b7d0b7
[jenkins] Add links to the packages in the GitHub comment. (#5301) 2018-12-20 07:34:57 +01:00
Rolf Bjarne Kvinge b21eb28b72
[jenkins] Improve rendering of failures on older macOS bots. (#5304)
Improve rendering of failures on older macOS bots by showing which bot things
failed on in the commit comment.
2018-12-20 07:34:23 +01:00
Rolf Bjarne Kvinge fc51fa887d
Enable the device build correctly when mono/llvm is bumped. (#5294)
This allowed #5252 to pass the PR build: the device build was disabled for the
PR test run.
2018-12-19 16:56:12 +01:00
Rolf Bjarne Kvinge 7360d4f7a7
[jenkins] Specify repo manually for GitHub statuses to fix maccore#898. (#5269)
Fixes https://github.com/xamarin/maccore/issues/898.
2018-12-13 16:38:08 +01:00
Rolf Bjarne Kvinge c8aa44beff
[jenkins] Print out the environment for debug purposes. (#5261)
This can be quite useful when writing new CI logic.
2018-12-12 15:01:03 +01:00
Rolf Bjarne Kvinge 49cd1923de
[CI] Add scripts to set github status from Azure DevOps. (#5246) 2018-12-11 09:00:35 +01:00
Rolf Bjarne Kvinge 0999bbaf48
[xharness] Fix retry-download-on-error-56 logic to actually work. (#5206)
Fix retry-download-on-error-56 logic to not fail forever if the first time
failed by resetting the EC variable after each try.

Fixes https://github.com/xamarin/maccore/issues/1098 (third time's the charm!)
2018-11-30 15:42:18 +01:00
Rolf Bjarne Kvinge 82634c088a
[jenkins] If provisioning an old mono fails with error 56, try again a few more times. Fixes maccore#1098. (#5200)
It seems curl can randomly fail with error 56, so if that happens, try again a
few more times before giving up.

Fixes https://github.com/xamarin/maccore/issues/1098.
2018-11-29 18:37:04 +01:00
Rolf Bjarne Kvinge ecb1081e23
[jenkins] Fix path to api diff in commit comment. (#5173) 2018-11-23 16:23:03 +01:00
Rolf Bjarne Kvinge b059252473
[jenkins] If provisioning fails with error 56, try again a few more times. Fixes maccore#1098. (#5168)
It seems curl can randomly fail with error 56, so if that happens, try again a
few more times before giving up.

Fixes https://github.com/xamarin/maccore/issues/1098.
2018-11-22 10:42:24 -05:00
Rolf Bjarne Kvinge 94d87ddba6
[jenkins] Don't execute the packaged XM tests on the main macOS version. (#5165)
* [jenkins] Don't execute the packaged XM tests on the main macOS version.

Don't execute the packaged XM tests on the main macOS version, since it's redundant.

It also prevents a potential test deadlock if all main bots are busy.

* Rework to make it show better in the Jenkins UI.
2018-11-21 12:21:57 -05:00
Rolf Bjarne Kvinge 6f54cb7c28
Bump maccore to get fix for test-docs. (#5163)
* Bump maccore to get fix for test-docs.

Commit list for xamarin/maccore:

* xamarin/maccore@6e9b63e537 Merge pull request #1162 from rolfbjarne/docfixer-fixes
* xamarin/maccore@4cf1d63b7b [docfixer] Create project files and fix a few issues. Fixes #1118.
* xamarin/maccore@714bd73a55 [docfixer] Avoid declaring the same target twice.
* xamarin/maccore@34f4bfa339 [populate] Directories need to call Directory.Exists for existence checks.
* xamarin/maccore@341333db88 [docs] Remove truly ancient and outdated targets to publish updated docs.

Diff: 7ba9c5a962...6e9b63e537

* [jenkins] Make it possible to force docs testing by applying a label to pull requests.
2018-11-21 10:11:55 -05:00
Rolf Bjarne Kvinge abbc4698d6
[jenkins] Improve failure reporting slightly by listing 'Test docs' and 'Test run' as failing stages in the commit comment. (#5150) 2018-11-21 01:45:39 -05:00
Rolf Bjarne Kvinge 5761691c21
[jenkins] Fix slack reporting, and make it more resilient against failures. Fixes maccore#1160. (#5142)
* [jenkins] Fix getting author name+email for Slack reporting.

* [jenkins] Make slack reporting more resilient against failures. Fixes maccore#1160.

Fixes https://github.com/xamarin/maccore/issues/1160.
2018-11-20 02:55:57 -05:00
Rolf Bjarne Kvinge e3f97c56dd
[jenkins] Run the 'Test docs' step even if the 'Run tests' step failed. (#5106)
This is done by preventing the 'Run tests' failure from throwing exceptions, and instead manually set failure modes.
2018-11-08 16:24:56 +01:00
Sam Schwarz d0d28f8200 Without this added the azure links in the side panel won't work. This step can also be updated to the new pipeline syntax using the pipeline syntax generator. (#5081) 2018-11-05 19:22:24 +01:00
Rolf Bjarne Kvinge fdc691d771 [jenkins] Remove any system versions of XI/XM to make absolutely sure nothing in our build requires them. (#5059) 2018-10-31 17:47:28 -04:00
Rolf Bjarne Kvinge 904be25c25
[xharness] Generate a system variant of dont link, and run it using the oldest mono version we support in Jenkins. Fixes #4121. (#4968)
This is an addition to the tests we already run on older macOS bots (and as such will not execute on our PR bots).

Fixes https://github.com/xamarin/xamarin-macios/issues/4121.
2018-10-15 16:51:46 +02:00
Rolf Bjarne Kvinge 3684204f5a
Improve generator diff to ignore changes we don't care about. (#4947)
This means we'll get an empty diff if there are no generator changes, so
update the logic that detects/reports empty generator diffs.

Also there's no need to ignore mdbs anymore, since we don't create mdbs.
2018-10-09 07:35:00 +02:00
Connor Adsit 3f728dacac Report updateinfo for xamarin.ios and xamarin.mac in artifacts.json (#4871) (#4943)
Expose the productId and versionId in artifacts.json to autofill this information in while publishing so it's less of a manual process.
2018-10-08 09:28:42 +02:00
Xamarin Jenkins User a36bd01e36 [d15-9] [builds] Adjust ifdefs to fix not building device architectures. Fixes maccore#1074. (#4908)
* [builds] Adjust ifdefs to fix not building device architectures. Fixes maccore#1074.

Fixes https://github.com/xamarin/maccore/issues/1074.

* [jenkins] Running configure and then cleaning everything is kind of useless, so reverse the order.
2018-10-03 16:06:07 +02:00
Connor Adsit fc0de6dee6 Report updateinfo for xamarin.ios and xamarin.mac in artifacts.json (#4871)
Expose the productId and versionId in artifacts.json to autofill this information in while publishing so it's less of a manual process.
2018-10-03 08:25:46 +02:00
Rolf Bjarne Kvinge 832f9a3a5a
[builds] Adjust ifdefs to fix not building device architectures. Fixes maccore#1074. (#4903)
* [builds] Adjust ifdefs to fix not building device architectures. Fixes maccore#1074.

Fixes https://github.com/xamarin/maccore/issues/1074.

* [jenkins] Running configure and then cleaning everything is kind of useless, so reverse the order.
2018-10-03 08:18:11 +02:00
Rolf Bjarne Kvinge 585297f76c
[jenkins] Remove duplicated diff lines in GH comment. (#4850) 2018-09-20 15:30:09 +02:00
Vincent Dondain 0038fdfbdf [jenkins] Fix double API diff printf (broken merge) 2018-09-19 11:10:31 -04:00
Vincent Dondain 2174ec41a2 Merge branch 'xcode10' 2018-09-18 14:12:39 -04:00
Vincent Dondain 91a52a17f5 Merge branch 'xcode10' into d15-9-merge-xcode10 2018-09-14 12:53:17 -04:00
Rolf Bjarne Kvinge 985547bd1e
[jenkins] Bump the keychain lock timeout from 2h to 6h. Fixes maccore#973. (#4733)
Our tests can take quite a while to run sometimes, and this makes sure we
don't get random failures when the tests that access the keychain are executed
at the end of the test run.

Bump maccore to get the same fix there.

Fixes https://github.com/xamarin/maccore/issues/973.

Commit diff for maccore bump: 9937926f56...07fde84362
2018-08-31 14:39:42 +02:00
Rolf Bjarne Kvinge 7e8ffdf2ec
Document how to run API comparison locally. (#4699) 2018-08-27 16:46:22 +02:00
Rolf Bjarne Kvinge 1d5c334a89
[jenkins] Don't give VSTS a fake branch. (#4667)
Something in VSTS changed, and now fake branch names don't work anymore.

So instead use real branch names (and for pull requests I've created a
'pull-request' branch we can use).
2018-08-21 23:31:42 +02:00
Sebastien Pouliot d99be7a03e
Merge d15-8 into xcode 10 2018-08-21 09:29:35 -04:00
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
Vincent Dondain eec95e881c Merge branch 'd15-8' into xcode10-rebase-15.8 2018-08-13 21:04:56 -04: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 3dcfdd47dd
[jenkins] Add support for completely skipping the public jenkins job using a label. (#4333)
This can be useful when working on the support for private jenkins, since many
of those changes can only be tested as a pull request, and they also tend to
include a lot of commits (because nothing can be tested locally).

So until whatever needs implementing for private jenkins is complete and
working, there's no need for the public bots to do anything for such pull
requests.
2018-06-26 15:50:54 +02:00
Rolf Bjarne Kvinge 5e40325917
[jenkins] Make the Jenkins-built packages the official ones. (#4287) 2018-06-19 07:20:28 +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 68e8696dc8
[Jenkins] Publish bundle.zip and msbuild.zip as GH statuses as well. (#4238) (#4279)
This also requires a maccore bump.

Diff: 76ab6a58ff...347ba77a16
2018-06-15 23:47:17 +02:00
Rolf Bjarne Kvinge dccbc5a74b [jenkins] Skip docs testing unless on master. 2018-06-14 10:31:24 +02:00
Rolf Bjarne Kvinge 4b707d961e
[jenkins] Use different emojiis depending on the result of the api/generator diffs. (#4240)
Makes it harder to accidentially skip reviewing changes.
2018-06-13 05:28:31 -07:00
Rolf Bjarne Kvinge d39c1469b7
[Jenkins] Publish bundle.zip and msbuild.zip as GH statuses as well. (#4238)
This also requires a maccore bump, commit list for xamarin/maccore:

* xamarin/maccore@443e956edc [release] Rename bundlefull.zip to bundle.zip. (#848)
* xamarin/maccore@5020593b3e Remove jenkinsfile from d15-8, tom-swifty doesn't track normal release branches. (#849)

Diff: a0a9c45942...443e956edc
2018-06-13 05:25:52 -07:00
Rolf Bjarne Kvinge 3334d54a47
[jenkins] Allow codesign without permission dialogs as well. (#4220) (#4223) 2018-06-12 09:03:30 -07: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
Rolf Bjarne Kvinge fa7f52dab0 [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-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge f7527aaba2 [jenkins] Revert unintended change that prevents the keychain from unlocking properly. (#4158) 2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge e0e2f93176 [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-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge 96d3445ccf [tests] Make sure accessing the keychain doesn't make macOS show any dialogs. (#4141) 2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge bece50d6bb [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-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge c35adef145 [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-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge ccb2f59ca1 [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-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge d7efd346ee [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-06-12 14:37:03 +02:00
Sebastien Pouliot fb322c4d15 [jenkins] Clean keystore on bots before running tests (#3754)
Because if invalid data gets into the store then some unit tests
will always fail on that particular bot.

Fix https://github.com/xamarin/maccore/issues/640
2018-06-12 14:37:03 +02:00
Rolf Bjarne Kvinge 90b6c17946
[jenkins] Allow codesign without permission dialogs as well. (#4220) 2018-06-12 05:21:28 -07:00