A Dockerized Jenkins CI-CD system for Concordia
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/usr/bin/env groovy
|
|
|
|
import hudson.tools.InstallSourceProperty
|
|
|
|
import jenkins.model.Jenkins
|
|
|
|
import jenkins.plugins.nodejs.tools.NodeJSInstallation
|
|
|
|
import jenkins.plugins.nodejs.tools.NodeJSInstaller
|
|
|
|
import static jenkins.plugins.nodejs.tools.NodeJSInstaller.DEFAULT_NPM_PACKAGES_REFRESH_HOURS
|
|
|
|
|
|
|
|
final versions = [
|
|
|
|
'NodeJS 13.x': '13.10.1',
|
|
|
|
'NodeJS 12.x': '12.16.1'
|
|
|
|
]
|
|
|
|
|
|
|
|
final globalPackages = "eslint@~6.8.0 truffle@~5.1.18"
|
|
|
|
|
|
|
|
Jenkins.instance.getDescriptor(NodeJSInstallation).with {
|
|
|
|
installations = versions.collect {
|
|
|
|
new NodeJSInstallation(it.key, null, [
|
|
|
|
new InstallSourceProperty([
|
|
|
|
new NodeJSInstaller(
|
|
|
|
it.value,
|
|
|
|
globalPackages,
|
|
|
|
DEFAULT_NPM_PACKAGES_REFRESH_HOURS)
|
|
|
|
])
|
|
|
|
])
|
|
|
|
} as NodeJSInstallation[]
|
|
|
|
}
|