diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2cdfc30f..c236bbc2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,5 +15,5 @@ jobs: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" with: - flags: "--nightly" + flags: "--nightly --arch-exclude arm" secrets: "inherit" diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5a39a47c..9f20eccd 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -14,5 +14,5 @@ jobs: needs: Spec uses: "puppetlabs/cat-github-actions/.github/workflows/module_acceptance.yml@main" with: - flags: "--nightly" + flags: "--nightly --arch-exclude arm" secrets: "inherit" diff --git a/.whitesource b/.whitesource new file mode 100644 index 00000000..04109aad --- /dev/null +++ b/.whitesource @@ -0,0 +1,45 @@ +{ + "scanSettings": { + "configMode": "AUTO", + "configExternalURL": "", + "projectToken": "", + "baseBranches": [] + }, + "scanSettingsSAST": { + "enableScan": true, + "scanPullRequests": true, + "incrementalScan": true, + "baseBranches": [], + "snippetSize": 10 + }, + "checkRunSettings": { + "vulnerableCheckRunConclusionLevel": "failure", + "displayMode": "diff", + "useMendCheckNames": true + }, + "checkRunSettingsSAST": { + "checkRunConclusionLevel": "failure", + "severityThreshold": "high" + }, + "issueSettings": { + "minSeverityLevel": "LOW", + "issueType": "DEPENDENCY" + }, + "issueSettingsSAST": { + "minSeverityLevel": "high", + "issueType": "repo" + }, + "remediateSettings": { + "workflowRules": { + "enabled": true + } + }, + "imageSettings":{ + "imageTracing":{ + "enableImageTracingPR": false, + "addRepositoryCoordinate": false, + "addDockerfilePath": false, + "addMendIdentifier": false + } + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c92ee508..ae542f81 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org). +## [v12.0.0](https://github.com/puppetlabs/puppetlabs-java/tree/v12.0.0) - 2026-06-28 + +[Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/v11.2.0...v12.0.0) + +### Changed + +- (CAT-2376) Puppetcore update [#614](https://github.com/puppetlabs/puppetlabs-java/pull/614) ([LukasAud](https://github.com/LukasAud)) + +### Added + +- (CAT-2152) Add support for Centos9 [#606](https://github.com/puppetlabs/puppetlabs-java/pull/606) ([skyamgarp](https://github.com/skyamgarp)) + +### Other + +- (MODULES-11840) Allow puppetlabs/stdlib 10.x [#626](https://github.com/puppetlabs/puppetlabs-java/pull/626) ([imaqsood](https://github.com/imaqsood)) +- Add support for Debian 13 (trixie) [#613](https://github.com/puppetlabs/puppetlabs-java/pull/613) ([mika](https://github.com/mika)) +- Configure Mend for GitHub.com [#608](https://github.com/puppetlabs/puppetlabs-java/pull/608) ([mend-for-github-com](https://github.com/mend-for-github-com)) +- Feat: Allow to download from a login/password protected URL [#588](https://github.com/puppetlabs/puppetlabs-java/pull/588) ([JGodin-C2C](https://github.com/JGodin-C2C)) + ## [v11.2.0](https://github.com/puppetlabs/puppetlabs-java/tree/v11.2.0) - 2025-07-18 [Full Changelog](https://github.com/puppetlabs/puppetlabs-java/compare/v11.1.0...v11.2.0) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e7a3a7c3..25bf5ebc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,3 +1,3 @@ # Contributing to Puppet modules -Check out our [Contributing to Supported Modules Blog Post](https://puppetlabs.github.io/iac/docs/contributing_to_a_module.html) to find all the information that you will need. +Check out our [Contributing to Puppet modules docs](https://help.puppet.com/core//current/Content/PuppetCore/contributing.htm) to find all the information that you will need. diff --git a/REFERENCE.md b/REFERENCE.md index f8064267..3fc8335d 100644 --- a/REFERENCE.md +++ b/REFERENCE.md @@ -379,8 +379,12 @@ The following parameters are available in the `java::download` defined type: * [`proxy_server`](#-java--download--proxy_server) * [`proxy_type`](#-java--download--proxy_type) * [`url`](#-java--download--url) +* [`username`](#-java--download--username) +* [`password`](#-java--download--password) * [`jce`](#-java--download--jce) * [`jce_url`](#-java--download--jce_url) +* [`jce_username`](#-java--download--jce_username) +* [`jce_password`](#-java--download--jce_password) * [`basedir`](#-java--download--basedir) * [`manage_basedir`](#-java--download--manage_basedir) * [`package_type`](#-java--download--package_type) @@ -451,6 +455,22 @@ Full URL Default value: `undef` +##### `username` + +Data type: `Optional[String]` + +Username for the URL + +Default value: `undef` + +##### `password` + +Data type: `Optional[String]` + +Password for the URL + +Default value: `undef` + ##### `jce` Data type: `Boolean` @@ -467,6 +487,22 @@ Full URL to the jce zip file Default value: `undef` +##### `jce_username` + +Data type: `Optional[String]` + +Username for the JCE URL + +Default value: `undef` + +##### `jce_password` + +Data type: `Optional[String]` + +Password for the JCE URL + +Default value: `undef` + ##### `basedir` Data type: `Optional[String]` diff --git a/manifests/download.pp b/manifests/download.pp index e8593820..4d451ffc 100644 --- a/manifests/download.pp +++ b/manifests/download.pp @@ -28,11 +28,23 @@ # @param url # Full URL # +# @param username +# Username for the URL +# +# @param password +# Password for the URL +# # @param jce # Install Oracles Java Cryptographic Extensions into the JRE or JDK # # @param jce_url # Full URL to the jce zip file +# +# @param jce_username +# Username for the JCE URL +# +# @param jce_password +# Password for the JCE URL # # @param basedir # Directory under which the installation will occur. If not set, defaults to @@ -62,8 +74,12 @@ Optional[String] $proxy_server = undef, Optional[Enum['none', 'http', 'https', 'ftp']] $proxy_type = undef, Optional[String] $url = undef, + Optional[String] $username = undef, + Optional[String] $password = undef, Boolean $jce = false, Optional[String] $jce_url = undef, + Optional[String] $jce_username = undef, + Optional[String] $jce_password = undef, Optional[String] $basedir = undef, Boolean $manage_basedir = false, Optional[String] $package_type = undef, @@ -258,6 +274,8 @@ archive { $destination : ensure => present, source => $source, + username => $username, + password => $password, extract_path => '/tmp', cleanup => false, creates => $creates_path, @@ -309,6 +327,8 @@ extract_path => $jce_path, extract_flags => '-oj', creates => "${jce_path}/US_export_policy.jar", + username => $jce_username, + password => $jce_password, cleanup => false, proxy_server => $proxy_server, proxy_type => $proxy_type, diff --git a/manifests/init.pp b/manifests/init.pp index 31750303..ce5dcb9a 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -110,13 +110,17 @@ default => '--jre' } - # If the OS is SLES >= 15.3, enable the legacy repo to install net-tools-deprecated package - if ($facts['os']['family'] in ['SLES', 'SUSE']) and (versioncmp($facts['os']['release']['full'], '15.3') >= 0) { - exec { 'Enable legacy repos': - path => '/bin:/usr/bin/:/sbin:/usr/sbin', - command => "SUSEConnect --product sle-module-legacy/${facts['os']['release']['full']}/x86_64", - unless => "SUSEConnect --status-text | grep sle-module-legacy/${facts['os']['release']['full']}/x86_64", + # TEMPORARY FIX: If no repos are configured on SLES, add openSUSE Leap as fallback + # This workaround is needed because GCP-provisioned SLES images are unregistered BYOS + # without any package repositories configured. Remove this once proper PAYG images are used. + if ($facts['os']['family'] in ['SLES', 'SUSE']) { + exec { 'Configure zypper repo for SLES': + path => '/bin:/usr/bin:/sbin:/usr/sbin', + command => 'zypper --non-interactive --gpg-auto-import-keys ar http://download.opensuse.org/distribution/leap/15.6/repo/oss/ opensuse-leap-fallback && zypper --non-interactive --gpg-auto-import-keys refresh', + unless => "zypper lr 2>/dev/null | grep -q 'opensuse-leap-fallback\\|http'", + logoutput => true, } + -> Package['java'] } if $facts['os']['family'] == 'Debian' { diff --git a/manifests/params.pp b/manifests/params.pp index 708d3e6f..fa352809 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -58,6 +58,9 @@ default => $facts['os']['architecture'] } case $facts['os']['release']['major'] { + '13': { + $openjdk = 21 + } '12', '24.04': { $openjdk = 17 } diff --git a/metadata.json b/metadata.json index 075338b3..60caa856 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "puppetlabs-java", - "version": "11.2.0", + "version": "12.0.0", "author": "puppetlabs", "summary": "Installs the correct Java package on various platforms.", "license": "Apache-2.0", @@ -10,7 +10,7 @@ "dependencies": [ { "name": "puppetlabs/stdlib", - "version_requirement": ">= 4.13.1 < 10.0.0" + "version_requirement": ">= 4.13.1 < 11.0.0" }, { "name": "puppet/archive", @@ -30,7 +30,8 @@ "operatingsystem": "CentOS", "operatingsystemrelease": [ "7", - "8" + "8", + "9" ] }, { @@ -44,7 +45,8 @@ "operatingsystemrelease": [ "10", "11", - "12" + "12", + "13" ] }, { diff --git a/spec/classes/java_spec.rb b/spec/classes/java_spec.rb index 90efa9f5..dd51a098 100644 --- a/spec/classes/java_spec.rb +++ b/spec/classes/java_spec.rb @@ -46,6 +46,24 @@ end end + context 'on Debian Trixie (13)' do + let(:facts) { { os: { family: 'Debian', name: 'Debian', lsb: { distcodename: 'trixie' }, release: { major: '13' }, architecture: 'amd64' } } } + + context 'when selecting jdk' do + let(:params) { { 'distribution' => 'jdk' } } + + it { is_expected.to contain_package('java').with_name('openjdk-21-jdk') } + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.21.0-openjdk-amd64/') } + end + + context 'when selecting jre' do + let(:params) { { 'distribution' => 'jre' } } + + it { is_expected.to contain_package('java').with_name('openjdk-21-jre-headless') } + it { is_expected.to contain_file_line('java-home-environment').with_line('JAVA_HOME=/usr/lib/jvm/java-1.21.0-openjdk-amd64/') } + end + end + context 'on Ubuntu Bionic (18.04)' do let(:facts) { { os: { family: 'Debian', name: 'Ubuntu', lsb: { distcodename: 'bionic' }, release: { major: '18.04' }, architecture: 'amd64' } } }