Skip to content

Fix Jenkinsfile configuration issues in ASF Jenkins #667

@jstastny-cz

Description

@jstastny-cz

After the move to ASF Jenkins, the existing Jenkinsfile suffer from a few issues:

  1. Groovy sandbox issues for shared library withSettingsXmlId method.
    The method from [1] has an issue with groovy function getAt not being allowed due to script security. This is a workaround to unblock while the limitation still lasts.
    The goal is to wrap each MavenCommand run method invocation with configFileProvider wrapper, expose the file path using a variable MAVEN_SETTINGS_FILE and invoke the run command with withSettingsXmlFile(MAVEN_SETTINGS_FILE) only in the closure.
  2. CleanWs with deferred cleanup in early stages break workspace - symptom is seeing loads of getcwd problems in logs.
    The goal is to use cleanWs(disableDeferredWipeout: true) to do the clean synchronously.
  3. Cleaning docker images and containers while we build in docker container and rely on passing of docker.sock from host - this would result in excessive cleanup of all cached images and containers, and would actually attempt at cleaning the build container itself.
    The goal is to remove such operations, one case is to use util.cleanNode() instead of util.cleanNode('docker')

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

🎯 Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions