Skip to content

Commit

Permalink
Merge pull request #1084 from voxpupuli/remove-legacy-top-scope-syntax
Browse files Browse the repository at this point in the history
Remove legacy top-scope syntax
  • Loading branch information
evgeni authored Apr 25, 2024
2 parents 7210da4 + 07bea61 commit ac3e0b7
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 20 deletions.
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ These should not affect the functionality of the module.
- systemd jenkins master support on RedHat [\#694](https://github.com/voxpupuli/puppet-jenkins/pull/694) ([jhoblitt](https://github.com/jhoblitt))
- fix slave systemd support [\#692](https://github.com/voxpupuli/puppet-jenkins/pull/692) ([jhoblitt](https://github.com/jhoblitt))
- add swarm client systemd support [\#691](https://github.com/voxpupuli/puppet-jenkins/pull/691) ([jhoblitt](https://github.com/jhoblitt))
- add ::jenkins::sysconfdir parameter [\#689](https://github.com/voxpupuli/puppet-jenkins/pull/689) ([jhoblitt](https://github.com/jhoblitt))
- add jenkins::sysconfdir parameter [\#689](https://github.com/voxpupuli/puppet-jenkins/pull/689) ([jhoblitt](https://github.com/jhoblitt))
- disable plugin pinning by default [\#688](https://github.com/voxpupuli/puppet-jenkins/pull/688) ([jhoblitt](https://github.com/jhoblitt))
- add firewall module dependency info [\#676](https://github.com/voxpupuli/puppet-jenkins/pull/676) ([vinhut](https://github.com/vinhut))
- Add support for gitlab api token credential - \#664 [\#667](https://github.com/voxpupuli/puppet-jenkins/pull/667) ([ripclawffb](https://github.com/ripclawffb))
Expand All @@ -245,7 +245,7 @@ These should not affect the functionality of the module.
- Won't install alongside puppetlabs-mysql [\#623](https://github.com/voxpupuli/puppet-jenkins/issues/623)
- uninitialized constant json when using Jenkins\_credentials provider [\#617](https://github.com/voxpupuli/puppet-jenkins/issues/617)
- `jenkins_user` experimental password setting is broken [\#499](https://github.com/voxpupuli/puppet-jenkins/issues/499)
- Ensure $::jenkins::localstatedir to Directory Breaks Filesystem's With Symlinked Mounts [\#403](https://github.com/voxpupuli/puppet-jenkins/issues/403)
- Ensure $jenkins::localstatedir to Directory Breaks Filesystem's With Symlinked Mounts [\#403](https://github.com/voxpupuli/puppet-jenkins/issues/403)
- repo::debian.pp does not work with apt module \>= 2.0.0 [\#402](https://github.com/voxpupuli/puppet-jenkins/issues/402)
- Jenkins Plugin manifest are now readable since it has got some invalid byte sequence in US-ASCII [\#265](https://github.com/voxpupuli/puppet-jenkins/issues/265)
- Default INFO logging makes jenkins cli output messages that are then … [\#907](https://github.com/voxpupuli/puppet-jenkins/pull/907) ([jhooyberghs](https://github.com/jhooyberghs))
Expand Down Expand Up @@ -302,7 +302,7 @@ These should not affect the functionality of the module.
- setting security is not idempotent [\#673](https://github.com/voxpupuli/puppet-jenkins/issues/673)
- 'digest\_type' default of 'sha1' is causing all plugins to install repeatedly [\#668](https://github.com/voxpupuli/puppet-jenkins/issues/668)
- puppet\_helper.groovy throws an error with unsupported credentials [\#664](https://github.com/voxpupuli/puppet-jenkins/issues/664)
- $::jenkins::libdir is undef in jenkins::cli class [\#654](https://github.com/voxpupuli/puppet-jenkins/issues/654)
- $jenkins::libdir is undef in jenkins::cli class [\#654](https://github.com/voxpupuli/puppet-jenkins/issues/654)
- Unsuccessful Installation [\#647](https://github.com/voxpupuli/puppet-jenkins/issues/647)
- jenkins::plugins doesn't work properly with puppet 4.6.2 [\#637](https://github.com/voxpupuli/puppet-jenkins/issues/637)
- Allow virtual jenkins host [\#630](https://github.com/voxpupuli/puppet-jenkins/issues/630)
Expand Down Expand Up @@ -440,7 +440,7 @@ These should not affect the functionality of the module.
- jenkins-slave don't stop correctly [\#557](https://github.com/voxpupuli/puppet-jenkins/issues/557)
- jenkins\_job broken by org.jenkinsci.plugins.workflow.job.WorkflowJob jobs [\#551](https://github.com/voxpupuli/puppet-jenkins/issues/551)
- Parameter jenkins::slave::ui\_pass not enclosed in quotes. [\#542](https://github.com/voxpupuli/puppet-jenkins/issues/542)
- ::jenkins::slave should not depend on ::jenkins [\#533](https://github.com/voxpupuli/puppet-jenkins/issues/533)
- jenkins::slave should not depend on jenkins [\#533](https://github.com/voxpupuli/puppet-jenkins/issues/533)
- slow unit test causing travis failures [\#517](https://github.com/voxpupuli/puppet-jenkins/issues/517)
- jenkins:plugin can incorrectly believe a plugin is installed \(when it isn't\) [\#513](https://github.com/voxpupuli/puppet-jenkins/issues/513)
- jenkins::plugin ignores version changes [\#512](https://github.com/voxpupuli/puppet-jenkins/issues/512)
Expand Down Expand Up @@ -497,7 +497,7 @@ These should not affect the functionality of the module.
- Plugins specified by version number are not updated [\#445](https://github.com/voxpupuli/puppet-jenkins/issues/445)
- Passing an array to jenkins::plugin [\#429](https://github.com/voxpupuli/puppet-jenkins/issues/429)
- Unable to persist firewall rules: Execution of '/usr/libexec/iptables/iptables.init save' returned 1: [\#424](https://github.com/voxpupuli/puppet-jenkins/issues/424)
- $::jenkins::port does not properly manage listening port [\#416](https://github.com/voxpupuli/puppet-jenkins/issues/416)
- $jenkins::port does not properly manage listening port [\#416](https://github.com/voxpupuli/puppet-jenkins/issues/416)
- Using Plugin Hash Exec Test for plugin Fails [\#410](https://github.com/voxpupuli/puppet-jenkins/issues/410)
- jenkins::job::present issue [\#409](https://github.com/voxpupuli/puppet-jenkins/issues/409)
- Using Direct URL for plug-ins restarts jenkins with every puppet run [\#408](https://github.com/voxpupuli/puppet-jenkins/issues/408)
Expand All @@ -518,7 +518,7 @@ These should not affect the functionality of the module.
- replace centos-7-docker fakesystemd with classic flavor [\#550](https://github.com/voxpupuli/puppet-jenkins/pull/550) ([jhoblitt](https://github.com/jhoblitt))
- travis puppet versions [\#549](https://github.com/voxpupuli/puppet-jenkins/pull/549) ([jhoblitt](https://github.com/jhoblitt))
- fix beaker acceptance tests on Ubuntu [\#548](https://github.com/voxpupuli/puppet-jenkins/pull/548) ([jhoblitt](https://github.com/jhoblitt))
- simplify ::jenkins::slave ordering logic [\#547](https://github.com/voxpupuli/puppet-jenkins/pull/547) ([jhoblitt](https://github.com/jhoblitt))
- simplify jenkins::slave ordering logic [\#547](https://github.com/voxpupuli/puppet-jenkins/pull/547) ([jhoblitt](https://github.com/jhoblitt))
- skip pending beaker tests [\#546](https://github.com/voxpupuli/puppet-jenkins/pull/546) ([jhoblitt](https://github.com/jhoblitt))
- minor puppet\_helper.groovy cleanup [\#543](https://github.com/voxpupuli/puppet-jenkins/pull/543) ([jhoblitt](https://github.com/jhoblitt))
- Improve spec speed [\#537](https://github.com/voxpupuli/puppet-jenkins/pull/537) ([petems](https://github.com/petems))
Expand Down Expand Up @@ -638,7 +638,7 @@ These should not affect the functionality of the module.
* [#275](https://github.com/jenkinsci/puppet-jenkins/pull/275) - add .bundle to .gitignore
* [#276](https://github.com/jenkinsci/puppet-jenkins/pull/276) - add log/ to .gitignore
* [#277](https://github.com/jenkinsci/puppet-jenkins/pull/277) - add puppet 3.7.0 to travis matrix
* [#278](https://github.com/jenkinsci/puppet-jenkins/pull/278) - remove unnecessary whitespace from $::jenkins::cli_helper::helper_cmd
* [#278](https://github.com/jenkinsci/puppet-jenkins/pull/278) - remove unnecessary whitespace from $jenkins::cli_helper::helper_cmd
* [#279](https://github.com/jenkinsci/puppet-jenkins/pull/279) - add metadata-json-lint to Gemfile & enable rake validate target
* [#280](https://github.com/jenkinsci/puppet-jenkins/pull/280) - change puppetlabs/stdlib version dep to >= 4.6.0
* [#282](https://github.com/jenkinsci/puppet-jenkins/pull/282) - Feature/puppet 4
Expand Down
2 changes: 1 addition & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
* [#275](https://github.com/jenkinsci/puppet-jenkins/pull/275) - add .bundle to .gitignore
* [#276](https://github.com/jenkinsci/puppet-jenkins/pull/276) - add log/ to .gitignore
* [#277](https://github.com/jenkinsci/puppet-jenkins/pull/277) - add puppet 3.7.0 to travis matrix
* [#278](https://github.com/jenkinsci/puppet-jenkins/pull/278) - remove unnecessary whitespace from $::jenkins::cli_helper::helper_cmd
* [#278](https://github.com/jenkinsci/puppet-jenkins/pull/278) - remove unnecessary whitespace from $jenkins::cli_helper::helper_cmd
* [#279](https://github.com/jenkinsci/puppet-jenkins/pull/279) - add metadata-json-lint to Gemfile & enable rake validate target
* [#280](https://github.com/jenkinsci/puppet-jenkins/pull/280) - change puppetlabs/stdlib version dep to >= 4.6.0
* [#282](https://github.com/jenkinsci/puppet-jenkins/pull/282) - Feature/puppet 4
Expand Down
4 changes: 2 additions & 2 deletions NATIVE_TYPES_AND_PROVIDERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ master service to be running. Most require the presence of
sufficiently for all providers to function.

```
class { '::jenkins':
class { 'jenkins':
install_java => true,
cli => true,
}
include ::jenkins::cli_helper
include jenkins::cli_helper
```

### `puppetserver`
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ This module has been adjusted to support the new CLI.

The CLI supports proper authentication with username and password. It's a
requirement for supporting AD and OpenID authentications (there is no ssh key
there). You can supply ```$::jenkins::cli_username``` and
```$::jenkins::cli_password``` to use username / password based authentication.
there). You can supply ```$jenkins::cli_username``` and
```$jenkins::cli_password``` to use username / password based authentication.
Then the puppet automation user can also reside in A.D

Note: Jenkins requires a ssh username, so you must also provide
```$::jenkins::cli_username``` for ssh. If you specify both username/password
```$jenkins::cli_username``` for ssh. If you specify both username/password
and ssh key file, SSH authentication is preferred.

# Using puppet-jenkins
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/parser/functions/jenkins_port.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Puppet::Parser::Functions
$port = jenkins_port()
ENDHEREDOC

config_hash = lookupvar('::jenkins::config_hash')
config_hash = lookupvar('jenkins::config_hash')
config_hash&.dig('JENKINS_PORT', 'value') || 8080
end
end
2 changes: 1 addition & 1 deletion lib/puppet/parser/functions/jenkins_prefix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ module Puppet::Parser::Functions
$prefix = jenkins_prefix()
ENDHEREDOC

config_hash = lookupvar('::jenkins::config_hash')
config_hash = lookupvar('jenkins::config_hash')
config_hash&.dig('PREFIX', 'value') || ''
end
end
4 changes: 2 additions & 2 deletions manifests/cli.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
include jenkins

# XXX Classes/defines which include the jenkins::cli class assume that they
# can use the cli even if $::jenkins::cli == false. This breaks the top
# can use the cli even if $jenkins::cli == false. This breaks the top
# level anchor pattern. The cli param should either be deprecated and
# essentially hardwired to true or attempting to use cli functionality
# without this param set should fail; either option is a backwards
Expand Down Expand Up @@ -72,7 +72,7 @@
require => File[$jar],
}

# jenkins::cli::reload should be included only after $::jenkins::cli::cmd is
# jenkins::cli::reload should be included only after $jenkins::cli::cmd is
# defined
include jenkins::cli::reload
}
2 changes: 1 addition & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@
if $cli_ssh_keyfile {
# SSH key auth
if empty($cli_username) {
fail('ERROR: Latest remoting free CLI (see https://issues.jenkins-ci.org/browse/JENKINS-41745) needs username for SSH Access (\$::jenkins::cli_username)')
fail('ERROR: Latest remoting free CLI (see https://issues.jenkins-ci.org/browse/JENKINS-41745) needs username for SSH Access (\$jenkins::cli_username)')
}
$_cli_auth_arg = "-i '${cli_ssh_keyfile}' -ssh -user '${cli_username}'"
} elsif !empty($cli_username) {
Expand Down
2 changes: 1 addition & 1 deletion manifests/job/present.pp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
$job_dir = "${jenkins::job_dir}/${jobname}"
$config_path = "${job_dir}/config.xml"

# Bring variables from Class['::jenkins'] into local scope.
# Bring variables from Class['jenkins'] into local scope.
$cli_tries = $jenkins::cli_tries
$cli_try_sleep = $jenkins::cli_try_sleep

Expand Down
2 changes: 1 addition & 1 deletion spec/functions/jenkins_prefix_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

context 'with default parameters' do
let(:pre_condition) do
'include ::jenkins'
'include jenkins'
end

it { is_expected.to run.with_params.and_return('') }
Expand Down

0 comments on commit ac3e0b7

Please sign in to comment.