Skip to content

Commit e85e1aa

Browse files
committed
Use @gforcada's contribution as a base to further enhance docs
- Make statements more concise - Address the reader with "you can do X" instead of passive voice "X is done" - Add pretty inline icons and MyST markup magic - Remove italicization style of `guilabel` elements - Add to index, remove from exclusion
1 parent 4605f6a commit e85e1aa

File tree

7 files changed

+52
-38
lines changed

7 files changed

+52
-38
lines changed
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

docs/_static/custom.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,6 @@ span.menuselection {
422422
padding: 4px 5px;
423423
font-size: 90%;
424424
font-weight: bold;
425-
font-style: italic;
426425
white-space: nowrap;
427426
}
428427

docs/conf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@
125125
"**/CONTRIBUTORS.rst",
126126
"**/LICENSE.rst",
127127
"**/README.rst",
128-
"contributing/core/continuous-integration.md",
129128
"plone.restapi/.*",
130129
"plone.restapi/bin",
131130
"plone.restapi/docs/source/glossary.md", # There can be only one Glossary.
Lines changed: 47 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,89 @@
11
---
22
myst:
33
html_meta:
4-
"description": "Essential continuous integration practices"
5-
"property=og:description": "Essential continuous integration practices"
6-
"property=og:title": "Essential continuous integration practices"
7-
"keywords": "Plone, continuous integration, best practices"
4+
"description": "Working with continuous integration via Jenkins and GitHub workflows in Plone"
5+
"property=og:description": "Working with continuous integration via Jenkins and GitHub workflows in Plone"
6+
"property=og:title": "Continuous integration"
7+
"keywords": "Plone, continuous integration, Jenkins, GitHub workflows"
88
---
99

10-
# Continuous Integration
10+
# Continuous integration
1111

12-
As a complex system build out of hundreds of small packages, Plone can be easily broken, inadvertently, with any change on any of its packages.
12+
As a complex system built from hundreds of small packages, Plone can be easily and inadvertently broken from a change to any of its packages.
13+
To help prevent breaking Plone, a mix of a {term}`continuous integration` (CI) systems of GitHub workflows and Jenkins thoroughly checks all changes.
1314

14-
For that a mix of a {term}`CI` system at [jenkins.plone.org](https://jenkins.plone.org) and GitHub Actions ensure that any change is thoroughly checked.
15+
Do not use continuous integration as a replacement for running tests and other checks locally before pushing commits to a Plone repository.
16+
See {ref}`test-and-code-quality-label` for an explanation, and {ref}`contributing-specific-contribution-policies-for-projects-label` for a project's specific contributing guidelines.
1517

16-
## Jenkins
1718

18-
Jenkins is the primary source of truth to know if the complete test suite of any Plone versions in development is passing or not.
19+
## GitHub workflows
20+
21+
Most Plone repositories use {term}`GitHub workflows` to run tests, check code quality, and perform other CI tasks on pushed commits to an open pull request.
22+
23+
If a pull request is opened from a branch in the repository, then checks will automatically run.
24+
Only members of certain Plone GitHub organization teams and users with write permission in the repository can do this.
25+
Otherwise GitHub workflows do not run automatically, and require a member with write permission to run the checks.
1926

20-
Jenkins is configured to react on changes done in any of the hundreds of repositories that all together make Plone.
27+
GitHub workflows should pass before running Jenkins checks and before merging an open pull request.
2128

22-
Whenever a change on any of those repositories happen, Jenkins starts a slew of testing jobs that ultimately answer the question of if those changes pass Plone's test suite.
2329

24-
### Triggering jobs (automatically)
30+
## Jenkins
31+
32+
[Jenkins](https://jenkins.plone.org) is the authoritative source to see whether the complete test suite passes for any Plone version under development.
33+
Jenkins can be run on a change to any of Plone's hundreds of repositories that it monitors.
2534

26-
As running the Jenkins jobs is a bit expensive, in time, Jenkins does not run automatically on any new commit.
2735

28-
Rather, Jenkins waits for a special comment to be found in a pull request on a repository that is monitored by Jenkins.
36+
### Run Jenkins
37+
38+
Running the entire test suite on Jenkins takes at least 30 minutes, and consumes precious server resources.
39+
For this reason, Jenkins is configured not to run automatically on each push to an open pull request.
40+
Instead you should wait until you have completed pushing commits to an open pull request, and have seen that all GitHub workflows have passed.
41+
42+
After all GitHub checks pass, and if Jenkins monitors the project, you can run Jenkins by adding a comment to the open pull request.
2943

3044
```text
3145
@jenkins-plone-org please run jobs
3246
```
3347

34-
Pasting the text above on a pull request, will trigger Jenkins to run all configured test suites related to the current pull request, **with the changes of the pull request itself**.
48+
This will trigger Jenkins to run all configured test suites using the changes in the pull request.
3549

36-
#### buildout.coredev special case
50+
You can also manually run Jenkins jobs by visiting our [Jenkins server](https://jenkins.plone.org/), logging in with your GitHub account, finding the right job, and clicking the <img alt="Build now icon" src="/_static/contributing/core/icon-build-now.svg" class="inline"> {guilabel}`Build now` button.
3751

38-
`buildout.coredev` is the special repository where our configuration and tooling to orchestrate Plone lies in.
3952

40-
Contrary to all the other repositories, whenever a commit is made on this repository, it automatically triggers Jenkins jobs to be run.
53+
#### `buildout.coredev` special case
4154

42-
### Triggering jobs (manually)
55+
`buildout.coredev` contains the configuration and tooling to orchestrate Plone.
56+
Contrary to all the other repositories, whenever a push is made to this repository, it automatically triggers Jenkins to run its jobs.
4357

44-
Jenkins jobs can also be triggered manually by going to our Jenkins server, login in with your GitHub account, finding the right job, and triggering the `Run` button.
4558

4659
### Results
4760

48-
Once a jenkins job is finished, it will update its status icon on Jenkins UI itself, but also report back to GitHub, the result of the job.
61+
Once a Jenkins job completes, it updates its status icon in the Jenkins UI, and reports the result of the job to the open pull request on GitHub.
4962

50-
For pull requests, this means a green check mark or a red cross will be displayed at the end of the pull request, on pull requests listings, even on the favicon itself.
63+
In GitHub at the end of the pull request, a status indicator of either a green check mark {guilabel}`` or a red cross {guilabel}`` will be displayed for the job, followed by a {guilabel}`Details` link back to the Jenkins job build for that pull request.
64+
The status indicator will also appear in the GitHub Octocat favicon in the web browser tab on the pull request, and on lists of pull requests.
5165

52-
This gives the expected feedback to the pull request author, or any reviewer interested in knowing how a given pull request fared in Jenkins. Thus allowing pull request reviewers or authors to decide if the pull request can already be merged.
66+
You can use the results to decide whether to merge the pull request.
5367

54-
#### On failures
5568

56-
If the Jenkins jobs reports failures, the statuses of the pull request will provide a `Details` link back to Jenkins.
69+
### Failure
5770

58-
That link leads back to the Jenkins job build for that pull request.
71+
If the Jenkins job reports a failure, you can investigate its cause.
72+
Click the {guilabel}`Details` link to show the stacktrace on Jenkins.
5973

60-
In that page, there is the list of test failures (if any) already listed. Clicking on them show the stacktrace that should help diagnose why there was an error on a given test.
74+
In the side bar of the job build page in Jenkins, click the <img alt="Console Output terminal icon" src="/_static/contributing/core/icon-terminal.svg" class="inline"> {guilabel}` Console Output` link to show the full console output.
75+
You can examine all the steps and debugging information that Jenkins generated while running the job.
76+
This can be helpful whenever the errors were not in a single test, but rather a test set up or tear down or other problem.
6177

62-
On the side bar of the job build page in Jenkins there is also `Console Output` link. This leads to the **full job output**, note that is large, where it can be seen all the steps and debugging information that Jenkins generated running the job.
6378

64-
This can be helpful whenever the errors where not on a single test, but rather a general testing set up/tear down problem.
79+
### Retry
6580

66-
### Retrying
67-
68-
If there were errors on the Jenkins jobs, and corrections have been made on the code, triggering the jenkins jobs again is a matter of giving the special comment on the GitHub pull request again:
81+
If there were errors on the Jenkins jobs, and you push additional commits to correct the errors, you can trigger the Jenkins jobs again by adding a comment to the open pull request in GitHub.
6982

7083
```text
7184
@jenkins-plone-org please run jobs
7285
```
7386

74-
Jenkins jobs can also be restarted within Jenkins UI itself. On the Jenkins job itself, and provided you are logged in, you can find a `Retry` link on the left toolbar. Clicking it will trigger a new Jenkins job with the same configuration as the one you are on.
75-
87+
You can also restart Jenkins jobs in the Jenkins UI.
88+
After logging in to Jenkins, and finding the appropriate job, you can click the <img alt="Retry icon" src="/_static/contributing/core/icon-retry.svg" class="inline"> {guilabel}`Retry` link on the left toolbar to retry the failed job.
7689
Jenkins will update GitHub statuses accordingly.

docs/contributing/core/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ Plone has a continuous integration ({term}`CI`) setup and follows CI rules.
299299
When you push a change to a Plone package, there may be GitHub workflows that run automatically.
300300
The CI package [mr.roboto](https://github.com/plone/mr.roboto) will perform some checks and suggest that you run Jenkins after all other CI runs.
301301

302-
%% See {doc}`continuous-integration` for more information.
302+
See {doc}`continuous-integration` for more information.
303303

304304

305305
## Additional material
@@ -308,7 +308,7 @@ The CI package [mr.roboto](https://github.com/plone/mr.roboto) will perform some
308308
:maxdepth: 1
309309
310310
documentation
311-
%% continuous-integration
311+
continuous-integration
312312
mrdeveloper
313313
plips
314314
plip-review

0 commit comments

Comments
 (0)