forked from voxpupuli/puppet-jenkins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop GoogleRobotPrivateKeyCredentials implementation
This implementation is broken and as preparation for 3.0.0 the code base is being reduced to working versions. If this is desired by users, a working patch should be provided.
- Loading branch information
Showing
7 changed files
with
15 additions
and
287 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -381,34 +381,6 @@ jenkins_credentials { '7e86e9fb-a8af-480f-b596-7191dc02bf38': | |
} | ||
``` | ||
|
||
### `GoogleRobotPrivateKeyCredentials` | ||
|
||
Using this credential type requires that the jenkins `google-oauth-plugin` plugin | ||
has been installed. | ||
|
||
```puppet | ||
jenkins_credentials { '587690b0-f793-44e6-bc46-889cce58fb71': | ||
ensure => 'present', | ||
impl => 'GoogleRobotPrivateKeyCredentials', | ||
json_key => @END | ||
{ | ||
"client_email": "[email protected]", | ||
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n" | ||
} | ||
| END | ||
, | ||
} | ||
``` | ||
or | ||
``` | ||
jenkins_credentials { '2f867d0d-e0c7-48a6-a355-1d4fd2ac6c22': | ||
ensure => 'present', | ||
impl => 'GoogleRobotPrivateKeyCredentials', | ||
email_address => '[email protected]', | ||
p12_key => 'LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCg==', | ||
} | ||
``` | ||
|
||
### `jenkins_job` | ||
|
||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,75 +238,6 @@ | |
end | ||
end | ||
|
||
context 'GoogleRobotPrivateKeyCredentials with json_key' do | ||
it 'works with no errors and idempotently' do | ||
pending('jenkins plugin tests are not consistently failing or succeeding: https://github.com/voxpupuli/puppet-jenkins/issues/839') | ||
pp = base_manifest + <<-EOS | ||
jenkins::plugin { [ | ||
'google-oauth-plugin', | ||
'oauth-credentials', | ||
]: } | ||
jenkins_credentials { '587690b0-f793-44e6-bc46-889cce58fb71': | ||
ensure => 'present', | ||
impl => 'GoogleRobotPrivateKeyCredentials', | ||
json_key => @(END) | ||
{ | ||
"client_email": "[email protected]", | ||
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n" | ||
} | ||
| END | ||
, | ||
} | ||
EOS | ||
|
||
apply(pp, catch_failures: true) | ||
apply(pp, catch_changes: true) | ||
end | ||
|
||
describe file('/var/lib/jenkins/credentials.xml') do | ||
# XXX need to properly compare the XML doc | ||
# trying to match anything other than the id this way might match other | ||
# credentails | ||
it { | ||
pending('jenkins plugin tests are not consistently failing or succeeding: https://github.com/voxpupuli/puppet-jenkins/issues/839') | ||
is_expected.to contain '<projectId>587690b0-f793-44e6-bc46-889cce58fb71</projectId>' | ||
} | ||
end | ||
end | ||
|
||
context 'GoogleRobotPrivateKeyCredentials with email_address and p12_key' do | ||
it 'works with no errors and idempotently' do | ||
pending('jenkins plugin tests are not consistently failing or succeeding: https://github.com/voxpupuli/puppet-jenkins/issues/839') | ||
pp = base_manifest + <<-EOS | ||
jenkins::plugin { [ | ||
'google-oauth-plugin', | ||
'oauth-credentials', | ||
]: } | ||
jenkins_credentials { '2f867d0d-e0c7-48a6-a355-1d4fd2ac6c22': | ||
ensure => 'present', | ||
impl => 'GoogleRobotPrivateKeyCredentials', | ||
email_address => '[email protected]', | ||
p12_key => 'LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCg==', | ||
} | ||
EOS | ||
|
||
apply(pp, catch_failures: true) | ||
apply(pp, catch_changes: true) | ||
end | ||
|
||
describe file('/var/lib/jenkins/credentials.xml') do | ||
# XXX need to properly compare the XML doc | ||
# trying to match anything other than the id this way might match other | ||
# credentails | ||
it { | ||
pending('jenkins plugin tests are not consistently failing or succeeding: https://github.com/voxpupuli/puppet-jenkins/issues/839') | ||
is_expected.to contain '<projectId>2f867d0d-e0c7-48a6-a355-1d4fd2ac6c22</projectId>' | ||
} | ||
end | ||
end | ||
|
||
context 'BrowserStackCredentials' do | ||
it 'works with no errors and idempotently' do | ||
pending('jenkins plugin tests are not consistently failing or succeeding: https://github.com/voxpupuli/puppet-jenkins/issues/839') | ||
|
Oops, something went wrong.