]> source.dussan.org Git - archiva.git/commitdiff
add a Delete action to delete logs older than 30D (#64)
authorOlivier Lamy <olamy@apache.org>
Sun, 10 Apr 2022 21:53:28 +0000 (07:53 +1000)
committerOlivier Lamy <olamy@apache.org>
Sun, 10 Apr 2022 21:56:10 +0000 (07:56 +1000)
* delete old logs files
* do not fork compilation

Signed-off-by: Olivier Lamy <olamy@apache.org>
Jenkinsfile
archiva-modules/archiva-web/archiva-webapp/src/main/resources/log4j2.xml

index 91354a681503a5c5cc25bd27f3b7ab68b161d7f2..c15f75642157a4c0c938f6501f62e482d82216dd 100644 (file)
@@ -106,7 +106,7 @@ pipeline {
                                 // -Dmaven.compiler.fork=true: Do compile in a separate forked process
                                 // -Dmaven.test.failure.ignore=true: Do not stop, if some tests fail
                                 // -Pci-build: Profile for CI-Server
-                                sh "mvn ${cmdLine} -B -U -e -fae -Dorg.slf4j.simpleLogger.showThreadName=true -Dmaven.compiler.fork=true -Pci-build -T${THREADS}"
+                                sh "mvn ${cmdLine} -B -U -e -fae -Dorg.slf4j.simpleLogger.showThreadName=true -Pci-build -T${THREADS}"
                             }
                 }
             }
index 7f12f2f6cd24f47e55d96c7d695b0ed366ea15fe..6d18560b251bf57e615f6091776583ed8880bab6 100644 (file)
       <Policies>
         <TimeBasedTriggeringPolicy />
       </Policies>
+      <DefaultRolloverStrategy max="30">
+        <Delete basePath="${logsDirectory}" maxDepth="2">
+          <IfFileName glob="*/*.log">
+            <IfLastModified age="P30D"/>
+          </IfFileName>
+        </Delete>
+      </DefaultRolloverStrategy>
     </RollingRandomAccessFile>
 
     <RollingRandomAccessFile name="auditlog" fileName="${logsDirectory}/archiva-audit.log"
       <Policies>
         <TimeBasedTriggeringPolicy />
       </Policies>
+      <DefaultRolloverStrategy max="30">
+        <Delete basePath="${logsDirectory}" maxDepth="2">
+          <IfFileName glob="*/*.log">
+            <IfLastModified age="P30D"/>
+          </IfFileName>
+        </Delete>
+      </DefaultRolloverStrategy>
     </RollingRandomAccessFile>
 
     <RollingRandomAccessFile name="redbackAuditLog" fileName="${logsDirectory}/archiva-security-audit.log"