* stable-2.16:
Use the environment variables provided by the GerritCodeReview-plugin
DeleteZombieCommentsRefsTest: Open RevWalk in try-with-resource
Documentation: Mention unused_deps with buildifier
Bazel: Remove bazel version check
Documentation: Recommend Bazelisk to launch bazel
Add a pgm to delete dead draft comments refs
Change-Id: I7ce0b91695a99cbfc630ba5fd69ba1cf20e84f7a
So far the pipeline described in the Jenkinsfile queried Gerrit to get
the change metadata. By now the GerritCodeReview provides this data as
environment variables. This reduces the boilerplate code needed in the
Jenkinsfile.
Change-Id: Ibc18d7f1b350e6070e93164cea6a5ff3fd826ae3
After the recent upgrades of Jenkins and the pipeline-related
plugins, the Groovy switch on string for the build results conversion
into the Checkers result returned null causing build failures.
Use the safer if/then/else construct that works also with
the latest Groovy/CPS sandbox.
Change-Id: Ibb4ea9d8b6669a548be1826519deaf008304dcf6
* stable-2.16:
Reduce change spamming from CI
Link checker result to the proper console URL
Remove unused createCheckPayload() method
Change-Id: I71f8209fcda072e5e06451db8ab2c403f45b0765
Now that the checks integration is reliable and
clear enough in terms of messaging, the extra spamming
from the CI on the change log can be reduced to a minimum
avoiding the redundant feedback on validation and build
logs URLs.
Change-Id: Idd23d088c5238ecdcd1106a378cf65e198b77782
The Checks API integration is now delegated to the
gerrit-code-review plugin and thus the createCheckPayload()
method isn't needed anymore.
Change-Id: I2479ec551c4dae85b83c504413e77405c327bd9f
* stable-2.16:
Bump Bazel version to 2.0.0
Set version in package.json to 2.16.16-SNAPSHOT
Use gerritCheck API for posting checker result
Change-Id: I78c316055ff87bf8878fcbbfeeae723640b95bd2
Since the upgrade to the Gerrit Code Review plugin
v0.4.0, the integration with Checks is tighter and
it isn't needed anymore to make a direct invocation
of the Checks API to submit the checker result.
Change-Id: Icc06094e0a66d7a0b2e1428dcb605395d4027501
* stable-2.16:
Use reliable check for empty env.GERRIT_CHANGE_NUMBER
Do not build on stable-2.14 branch
Change-Id: If60fc67b15f4b5090cbee6dd9c65f4dbe4b5fcba
Check for either null or empty variable when looking
for the current Gerrit change number under build in
Jenkinsfile.
Change-Id: Ia274647bb135dda61111845c970f5f4762093dcd
* stable-2.16:
Update paper-styles to dd0b13e186b9690d5e74a93f6e51e0835ea60495
Fix reporting for flaky builds in Jenkinsfile
Change-Id: Ibcf36ab82b85684baf8c442eddc81fee66320341
When running on a regular branch, there is no need to
report any feedback to Gerrit because the commits are merged
already and any negative validation would be ignored.
Run the dedicated build for branches rather than invoking
the special validation jobs.
Change-Id: I6b9b8bbe41fc2763b48162c8fb9477e1a8807e0c
The verification pipeline was not properly reporting the results of
builds that were suspect to being flaky. This happened, because the
build did not save the results in a variable, if the propagate option
was used, which had to be done for the pipeline plugin's retry command
to work.
Instead of using the retry-command provided by the pipeline plugin,
the Jenkinsfile implements this behaviour manually.
Bug: Issue 11927
Change-Id: I419a20f69cabc4c54d7f57fd04ad354563eafd71
When retriggering flaky builds, do not use the non-CPS method Map.remove()
and instead create a new Map.
Bug: Issue 11876
Change-Id: I383a2351ad907acd19d21c459a0fd660e8abe028
* stable-2.16:
Update highlight.js to include soy
Update building docs for building highlight.js
config-gerrit: Remove superfluous quote mark
Stop query from executing if predicate is empty
Highlight jinja2 syntax
Highlight Jenkinsfile as groovy
Update highlight.js
Verify Gerrit changes also on NoteDb
Don't sort messages returned by Jenkins
Fix string formatting in Jenkinsfile
Fix RejectedAccessException during posting checks in Jenkinsfile
Remove unnecessary SCM checkout from Jenkinsfile
Fix expected response code when posting checks in Jenkinsfile
Use basic auth for posting checks
Add Jenkinsfile for verification pipeline
Remove the reviewDb build from Jenkinsfile.
Change-Id: I48f1fd6c19f87a55cb838955c5edbfb40f7db68f
The sorting of messages Jenkins would send back after verifying
a change did not work anymore as it was implemented in the workflow script.
This change removes the sorting of the messages.
Change-Id: I9cb14308ed354c31fae08e3c7190a7f886f242bf
The string formatting in the Jenkinsfile during the post of the
checks was broken. Groovy did not accept the operator in a hanging
line.
Change-Id: Ica7e6e9dedde31ca90888e4288975f4a1e6e7a07
The response code returned on success was 200, but the job described
in the Jenkinsfile expected 201. Now the job correctly expects 200.
Change-Id: I7f22484d98f399fa8dbebec1bdc73926bf8e4040
The verification pipeline described in the Jenkinsfile was trying to
post checks without authentication. This led to a returned 401 status.
Change-Id: Ic3bf661373fe7a8b51416d900690c105c10987b3
So far the job for verifying changes in the `gerrit`-project was managed
in the repository of the CI itself. These jobs were still using the by
now deprecated workflow type.
This change adds a Jenkinsfile to this project, which describes the build
and test workflow to be executed by the CI. The job will be executed by a
multibranch pipeline in the CI.
Note, that the job described in the Jenkinsfile for now just starts
other jobs that will verify and check the code style of the change as it
was done so far in the `Gerrit-verifier-change`-job. It is planned to
change that in the future.
Notable changes to the `Gerrit-verifier-change`-job are:
- The job will not check on which branch it runs. The Jenkinsfiles present
in the different branches will have to contain the branch-specific
code.
- In pipelines Jenkins is very strict in which methods are allowed to be
executed, since code can easily be added to a Jenkinsfile, which could
execute malicious commands on the CI. To avoid to have to whitelist such
methods in general, the code was adapted to only use allowed methods.
- The job is now triggered by the `verifier-trigger`-job in the CI.
Change-Id: I4d9ac3ebfd342243c6b7bf36186567e1b5175a4f