Excerpt | ||
---|---|---|
| ||
STATUS: implemented as of 2017-11-15 |
Rationale
We have a number of automated processes which make use of the Git repositories as a source of truth:
...
In the future, we may look into other automation, such as:
...
- automatically maintaining a README.md which points to documentation URLs or the build Job
...
The module file will be named .sling-module.xmljson
. It is a "dotfile" as it is not usually touched during regular development. The XML JSON format allows easy consumption from various tools and , compared to JSON, allows defining comments, including the Jenkins scripted pipelines. A previous version of the module descriptor used XML, which also allowed comments, but unfortunately it's not easily readable from Jenkins scripted pipelines.
Rather than listing a specification, a full example is provided below:
Code Block | ||||
---|---|---|---|---|
| ||||
<sling-module> <jenkins> <!-- settings inspected by Jenkins --> <jdks> <!-- replaces the default jdks when present --> <jdk>1.8</jdk> <jdk>9</jdk> </jdks> <downstreamProjects> <!-- adds more downstream projects when present --> <downstreamProject>sling-org-apache-sling-launchpad-testing</downstreamProject> </downstreamProjects> <archivePatterns> <!-- adds more archive patterns when present --> <archivePattern>{ "jenkins": { "jdks": [ 8, 9 ], "archivePatterns": [ "**/sling/logs/error.log</archivePattern> </archivePatterns> <!-- overrides the default goal when set --> <mavenGoal>install</mavenGoal> <!-- Additional parameters to pass to the Maven invocation --> <additionalMavenParams>-log" ], "mavenGoal": "install", "additionalMavenParams": "-Dorg.ops4j.pax.url.mvn.repositories=http://repo.maven.apache.org/maven2@id=apache-releases,http://repository.apache.org/content/groups/snapshots-group@snapshots@noreleases@id=apache-snapshots</additionalMavenParams> <!-- rebuilds the job periodically when defined --> <rebuildFrequency>@weekly</rebuildFrequency> snapshots", "upstreamProjects": [ <!"sling-- when set to true, xvfb support is enabled -->org-apache-sling-starter" <enableXvfb>true</enableXvfb> <!-- No Jenkins job generated when set to false --> <enabled>false</enabled> </jenkins> <aggregator> <!-- setting inspected by sling-aggregator tooling --> <groups> <!-- generates repo "groups" settings and separate Maven profile in the global reactor pom, when present --> <group>scripting</group> <group>sightly</group> </groups> </aggregator> </sling-module>], "rebuildFrequency": "@weekly", "enabled": false, "emailRecipients": [ "dev@sling.apache.org" ] } } |