Skip to content

Commit

Permalink
Merge branch 'xwiki:master' into XWIKI-21584
Browse files Browse the repository at this point in the history
  • Loading branch information
Sereza7 authored Oct 16, 2024
2 parents 15cc814 + 30ab390 commit dc610f3
Show file tree
Hide file tree
Showing 2,067 changed files with 69,389 additions and 17,109 deletions.
24 changes: 22 additions & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,36 @@
"ignoreDeps": ["org.eclipse.m2e:lifecycle-mapping"],

"packageRules": [
// Indicate the URL to the XWiki Nexus public proxy for non-Central Maven dependencies
// Add the URL to the XWiki Nexus public proxy for non-Central Maven dependencies
{
"matchDatasources": ["maven"],
"registryUrls": ["https://nexus.xwiki.org/nexus/content/repositories/public/"]
"registryUrls": ["https://repo1.maven.org/maven2/", "https://nexus.xwiki.org/nexus/content/repositories/public/"]
},

// There is no point trying to find updates for commons, rendering and platform dependencies
{
"matchPackagePrefixes": ["org.xwiki.commons:", "org.xwiki.rendering:", "org.xwiki.platform:", "org.xwiki.enterprise:"],
"enabled": false
},

// Automatically assign npm packages to @manuelleduc
{
"matchDatasources": ["npm"],
"assignees": ["manuelleduc"]
},

// Automatically assign webjars packages to @mflorea
{
"matchDatasources": ["maven"],
"matchPackageNames": ["org.webjars*"],
"assignees": ["mflorea"]
},

// Automatically assign other Maven dependencies to @tmortagne
{
"matchDatasources": ["maven"],
"matchPackageNames": ["!org.webjars*"],
"assignees": ["tmortagne"]
}
]
}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ nbproject
# Visual Studio Code
.vscode

# Gradle Enterprise
# Gradle Enterprise/Develocity
.mvn/.gradle-enterprise
.mvn/.develocity

# Debugging stuff to not commit
xwiki-platform-core/xwiki-platform-search/xwiki-platform-search-solr/xwiki-platform-search-solr-api/src/main/resources/xwiki-platform-search-solr-server-core.zip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,14 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
import com.gradle.maven.extension.api.scan.BuildScanApi
import com.gradle.develocity.agent.maven.adapters.BuildScanApiAdapter

/**
* Captures the Maven active profiles and add them as tags to the Build Scan. The goal is to make it simpler to
* filter builds on <a href="ge.xwiki.org">https://ge.xwiki.org</a> by filtering on Maven profiles.
*/

BuildScanApi buildScan = session.lookup('com.gradle.maven.extension.api.scan.BuildScanApi')
if (!buildScan) {
return
}

buildScan.executeOnce('tag-profiles') { BuildScanApi buildScanApi ->
buildScan.executeOnce('tag-profiles') { BuildScanApiAdapter buildScanApi ->

// Add all maven profile names as tags
project.activeProfiles.each { buildScanApi.tag(it.id) }
Expand All @@ -55,5 +50,3 @@ buildScan.executeOnce('tag-profiles') { BuildScanApi buildScanApi ->
buildScanApi.tag(browser.toLowerCase())
}
}


27 changes: 14 additions & 13 deletions .mvn/gradle-enterprise.xml → .mvn/develocity.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,27 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<gradleEnterprise
xmlns="https://www.gradle.com/gradle-enterprise-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/gradle-enterprise-maven https://www.gradle.com/schema/gradle-enterprise-maven.xsd">
<develocity
xmlns="https://www.gradle.com/develocity-maven" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.gradle.com/develocity-maven https://www.gradle.com/schema/develocity-maven.xsd">
<server>
<url>https://ge.xwiki.org</url>
</server>
<buildScan>
<publishIfAuthenticated>true</publishIfAuthenticated>
<!-- Always publish build scans on CI but on demand for devs so that we don't get false positives on ge.xwiki.org
due to local changes from users and so that it doesn't pollute the ge.xwiki.org data.
To force publishing a build scan: -Dscan -->
<publish>#{env['CI'] == null ? 'ON_DEMAND' : 'ALWAYS'}</publish>
<publishing>
<onlyIf><![CDATA[env['CI'] != null && authenticated]]></onlyIf>
</publishing>
<captureGoalInputFiles>true</captureGoalInputFiles>
<!-- Use background scans only locally to avoid potential issues on CI (the ephemeral docker agent could terminate
as soon as the build is finished and thus the upload may be terminated before it completes) -->
<backgroundBuildScanUpload>#{env['CI'] == null}</backgroundBuildScanUpload>
<backgroundBuildScanUpload><![CDATA[env['CI'] == null]]></backgroundBuildScanUpload>
</buildScan>
<buildCache>
<!-- Notes:
* To disable the local build cache on the command line, pass: -Dgradle.cache.local.enabled=false
* To disable the local build cache on the command line, pass: -Ddevelocity.cache.local.enabled=false
* We disable the local build cache on CI since our agents are transients and isolated, and thus it would cost
more to save the goal outputs since they're not going to be re-used.
-->
Expand All @@ -48,19 +49,19 @@
</local>
<remote>
<!-- Notes:
* To disable the remote build cache on the command line, pass: -Dgradle.cache.remote.enabled=false
* To disable the remote build cache on the command line, pass: -Ddevelocity.cache.remote.enabled=false
-->
<enabled>true</enabled>
<!-- Only CI jobs are allowed to store build outputs in the remote cache -->
<storeEnabled>#{isTrue(env['CI']) and isTrue(env['GRADLE_ENTERPRISE_ACCESS_KEY'])}</storeEnabled>
<storeEnabled>#{env['CI'] != null}</storeEnabled>
<server>
<!-- Note: Remote cache authentication is handled in the Maven settings.xml file. The id below is the one
found in settings.xml -->
<id>gradleEnterpriseCache</id>
<!-- Note: Remote cache authentication is handled in the .m2/.develocity/keys.properties file and not
anymore in the Maven settings.xml file -->
<id>develocityCache</id>
<!-- We override the default built-in node to use a EU node closer to our CI to reduce the cache lag (and thus
to make caching more beneficial vs rebuilding) -->
<url>https://eu-build-cache-ge.xwiki.org/cache/</url>
</server>
</remote>
</buildCache>
</gradleEnterprise>
</develocity>
9 changes: 5 additions & 4 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->

<extensions>
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.1.0 https://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>com.gradle</groupId>
<artifactId>gradle-enterprise-maven-extension</artifactId>
<version>1.20.1</version>
<artifactId>develocity-maven-extension</artifactId>
<version>1.22.2</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>1.13</version>
<version>2.0.1</version>
</extension>
</extensions>
38 changes: 25 additions & 13 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -114,19 +114,29 @@ def builds = [
)
},
'Quality' : {
// Run the quality checks.
// Sonar notes:
// - we need sonar:sonar to perform the analysis and push the results to Sonarcloud
// - we need jacoco:report to execute jacoco and compute test coverage
// - we need -Pcoverage and -Dxwiki.jacoco.itDestFile to tell Jacoco to compute a single global Jacoco
// coverage for the full reactor (so that the coverage percentage computed takes into account module tests
// which cover code in other modules)
build(
name: 'Quality',
goals: 'clean install jacoco:report sonar:sonar',
profiles: 'quality,legacy,coverage',
properties: '-Dxwiki.jacoco.itDestFile=`pwd`/target/jacoco-it.exec'
)
node() {
// Run the quality checks.
// Notes for step 1:
// - The build executes jacoco to generate a single jacoco exec file containing the results of the coverage
// for all tests from all modules. This why we need -Pcoverage and -Dxwiki.jacoco.itDestFile.
buildInsideNode(
name: 'Quality Step 1',
goals: 'clean install',
profiles: 'repository-snapshots,quality,legacy,coverage',
properties: '-Dxwiki.jacoco.itDestFile=`pwd`/target/jacoco-it.exec'
)
// Notes for step 2:
// - We generate the jacoco reports for all modules (all from the single jacoco-it.exec file)
// - We then generate the sonar analysis and upload to Sonarcloud with the sonar:sonar goal.
// - Sonar uses the jacoco report files and it's thus important that the sonar:sonar goal is executed after
// the jacoco:report one.
buildInsideNode(
name: 'Quality Step 2',
goals: 'jacoco:report sonar:sonar',
profiles: 'repository-snapshots,quality,legacy,coverage',
properties: '-Dxwiki.jacoco.itDestFile=`pwd`/target/jacoco-it.exec'
)
}
}
]

Expand Down Expand Up @@ -284,6 +294,8 @@ private void buildInsideNode(map)
// Keep builds for 30 days since we want to be able to see all builds if there are a lot at a given time, to be
// able to identify flickers, etc.
daysToKeepStr = '30'
// We don't need to trigger xwiki-platform monthly since it's already the case of xwiki-commons
monthlyTrigger = false
if (map.pom != null) {
pom = map.pom
}
Expand Down
Loading

0 comments on commit dc610f3

Please sign in to comment.