×
Find plugins

AdoptOpenJDK installer
1.2Minimum Jenkins requirement: 2.164.2ID: adoptopenjdk

Installs: 328
Last released: 7 days ago
Maintainers
Mads Mohr Christensen

Jenkins AdoptOpenJDK installer Plugin

Jenkins Plugin Jenkins Plugin Installs

Provides an installer for the JDK tool that downloads the JDK from https://adoptopenjdk.net/

Usage recommendations

We want to warn that this plugin is NOT a good practice for production environments. As it relies on the AdoptOpenJDK's website to do the job, it's highly likely to stop working. It could happen because AdoptOpenJDK's website change or even if AdoptOpenJDK bans our downloads due to excessive bandwidth or whatever other reason). Currently AdoptOpenJDK is using GitHub for hosting release archives and GitHub could also stop working due to similar reasons.

The recommended approach is to download the JDK distribution using other installers, for example downloading it from a well known URL (preferably hosted on your own network) with ZIP Tool Installer, having it pre-installed in agent docker images, or executing a script to do the job.

Configure plugin via Groovy script

Either automatically upon Jenkins post-initialization or through Jenkins script console, example:

#!/usr/bin/env groovy
import hudson.model.JDK
import hudson.tools.InstallSourceProperty
import io.jenkins.plugins.adoptopenjdk.AdoptOpenJDKInstaller
import jenkins.model.Jenkins

final versions = [
        'jdk8': 'jdk8u222-b10'
]

Jenkins.instance.getDescriptor(hudson.model.JDK).with {
    installations = versions.collect {
        new JDK(it.key, '', [
                new InstallSourceProperty([
                        new AdoptOpenJDKInstaller(it.value)
                ])
        ])
    } as JDK[]

}

Changelog

Changelog

Maintainers

  • Mads Mohr Christensen

License

(The MIT License)

Copyright (C) 2016 - 2019 Mads Mohr Christensen

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
ArchivesGet past versions
Links
Labels
This plugin has no labels