Skip to content

Commit

Permalink
Merge pull request #25324 from ribafish/ribafish/develocity
Browse files Browse the repository at this point in the history
Added basic develocity setup #25322
  • Loading branch information
arjantijms authored Jan 14, 2025
2 parents 9cd76c2 + 65836cb commit 8de2acf
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,6 @@ jobs:
# qa skips documentation - we check it on Jenkins CI
# We skip checkstyle too - we check it on Jenkins CI
run: ./apache-maven-3.9.9/bin/mvn -B -e clean install -Pstaging -Pqa '-Dcheckstyle.skip=true'
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_API_TOKEN }}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,4 @@ appserver/tests/appserv-tests/temppwd

opendj-*.zip
/opendj/
.mvn/.develocity/develocity-workspace-id
29 changes: 29 additions & 0 deletions .mvn/develocity.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<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://develocity-staging.eclipse.org</url>
</server>
<projectId>glassfish</projectId>
<buildScan>
<obfuscation>
<ipAddresses>0.0.0.0</ipAddresses>
</obfuscation>
<publishing>
<onlyIf>
<![CDATA[authenticated]]>
</onlyIf>
</publishing>
<backgroundBuildScanUpload>#{isFalse(env['CI']) and isFalse(env['JENKINS_URL'])}</backgroundBuildScanUpload>
</buildScan>
<buildCache>
<local>
<enabled>false</enabled>
</local>
<remote>
<enabled>false</enabled>
<storeEnabled>#{isTrue(env['CI']) or isTrue(env['JENKINS_URL'])}</storeEnabled>
</remote>
</buildCache>
</develocity>
13 changes: 13 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<extensions>
<extension>
<groupId>com.gradle</groupId>
<artifactId>develocity-maven-extension</artifactId>
<version>1.23</version>
</extension>
<extension>
<groupId>com.gradle</groupId>
<artifactId>common-custom-user-data-maven-extension</artifactId>
<version>2.0.1</version>
</extension>
</extensions>
62 changes: 38 additions & 24 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

def secrets = [
[path: 'cbi/glassfish/develocity.eclipse.org', secretValues: [
[envVar: 'DEVELOCITY_ACCESS_KEY', vaultKey: 'api-token']
]
]
]

def dumpSysInfo() {
sh """
Expand Down Expand Up @@ -66,12 +72,14 @@ def generateAntPodTemplate(job) {
timeout(time: 1, unit: 'HOURS') {
withAnt(installation: 'apache-ant-latest') {
dumpSysInfo()
sh """
mkdir -p ${WORKSPACE}/appserver/tests
tar -xzf ${WORKSPACE}/bundles/appserv_tests.tar.gz -C ${WORKSPACE}/appserver/tests
export CLASSPATH=${WORKSPACE}/glassfish7/javadb
${WORKSPACE}/appserver/tests/gftest.sh run_test ${job}
"""
withVault([vaultSecrets: secrets]) {
sh """
mkdir -p ${WORKSPACE}/appserver/tests
tar -xzf ${WORKSPACE}/bundles/appserv_tests.tar.gz -C ${WORKSPACE}/appserver/tests
export CLASSPATH=${WORKSPACE}/glassfish7/javadb
${WORKSPACE}/appserver/tests/gftest.sh run_test ${job}
"""
}
}
}
} finally {
Expand Down Expand Up @@ -186,18 +194,20 @@ spec:
checkout scm
container('maven') {
dumpSysInfo()
sh '''
# Validate the structure in all submodules (especially version ids)
mvn -B -e -fae clean validate -Ptck,set-version-id,staging
# Until we fix ANTLR in cmp-support-sqlstore, broken in parallel builds. Just -Pfast after the fix.
mvn -B -e install -Pfastest,staging -T4C
./gfbuild.sh archive_bundles
./gfbuild.sh archive_embedded
mvn -B -e clean -Pstaging
tar -c -C ${WORKSPACE}/appserver/tests common_test.sh gftest.sh appserv-tests quicklook | gzip --fast > ${WORKSPACE}/bundles/appserv_tests.tar.gz
ls -la ${WORKSPACE}/bundles
ls -la ${WORKSPACE}/embedded
'''
withVault([vaultSecrets: secrets]) {
sh '''
# Validate the structure in all submodules (especially version ids)
mvn -B -e -fae clean validate -Ptck,set-version-id,staging
# Until we fix ANTLR in cmp-support-sqlstore, broken in parallel builds. Just -Pfast after the fix.
mvn -B -e install -Pfastest,staging -T4C
./gfbuild.sh archive_bundles
./gfbuild.sh archive_embedded
mvn -B -e clean -Pstaging
tar -c -C ${WORKSPACE}/appserver/tests common_test.sh gftest.sh appserv-tests quicklook | gzip --fast > ${WORKSPACE}/bundles/appserv_tests.tar.gz
ls -la ${WORKSPACE}/bundles
ls -la ${WORKSPACE}/embedded
'''
}
}
archiveArtifacts artifacts: 'bundles/*.zip', onlyIfSuccessful: true
archiveArtifacts artifacts: 'embedded/*', onlyIfSuccessful: true
Expand All @@ -210,9 +220,11 @@ spec:
container('maven') {
dumpSysInfo()
timeout(time: 1, unit: 'HOURS') {
sh '''
mvn -B -e clean install -Pstaging,qa
'''
withVault([vaultSecrets: secrets]) {
sh '''
mvn -B -e clean install -Pstaging,qa
'''
}
}
}
}
Expand Down Expand Up @@ -245,9 +257,11 @@ spec:
container('maven') {
dumpSysInfo()
timeout(time: 1, unit: 'HOURS') {
sh '''
mvn -B -e clean install -Pstaging -f docs -amd
'''
withVault([vaultSecrets: secrets]) {
sh '''
mvn -B -e clean install -Pstaging -f docs -amd
'''
}
}
}
}
Expand Down

0 comments on commit 8de2acf

Please sign in to comment.