Completed

So we need to create dsl script to create jenkins credentials

Hello

assume there is TEST folder on jenkins, create groovy or DSL script to automate and create SSH credential

let me show you existing code

//this DSL creates with username and pwd

folder('ESB') {

description 'The folder contains all jobs for regular tests'

properties {

folderCredentialsProperty {

domainCredentials {

domainCredentials {

domain {

name("ESB_Credentials")

description("Credentials restricted to ESB_Credentials domain")

}

credentials {

usernamePasswordCredentialsImpl {

scope("GLOBAL")

id("test_user_id")

description("User for deployments on test environment")

username("test_user")

password("password")

}

}

}

}

}

}

}

this is for plain user name and pwd

I want similar for ssh key credential

create jenkins DSL to create credentials

1. there can be more than one credentials

2. credential can be user/pwd or with ssh key

3. script shall create custom folder and create credentials there

4. all user, pwd and ssh should dynamically loaded into script

below the script I tried for ssh but not working:

folder("testkey") {

description 'The folder contains all jobs for regular tests'

properties {

folderCredentialsProperty {

domainCredentials {

domainCredentials {

domain {

name("ESB_Credentials")

description("Credentials restricted to ESB_Credentials domain")

}

credentials {

basicSSHUserPrivateKey{

scope("GLOBAL")

id("test_user_pkey")

description("User for deployments on test environment")

username("test_user_dev")

privateKeySource{

directEntryPrivateKeySource {

privateKey([login to view URL]('SSH-PRIVATE-KEY-HERE'))

}

}

passphrase ("test")

}

}

}

}

}

}

}

Skills: Jenkins, DSL/MODEMs

See more: need classified script, script microsoft dns create host record, urgent need gallery script, need example script, need sale script, need php script sync mssql mysql, need php script, need shop script freelancer, need freelancer script, need ptc script, need clone script neobuxcom, need ilance script software, need coupon script, need raffle script, user need referral script, need matrimonial script, need gambling script, need trade script, need swoopo script

About the Employer:
( 99 reviews ) CHITTAGONG, Bangladesh

Project ID: #25515496

Awarded to:

balabal

Hey!!! I read your description and understood the requirements. You have gone through the right approach but small mistake in code. It doesn't cost you more bucks if my idea would succeed. Let me see the real code:)

$75 CAD in 1 day
(0 Reviews)
0.0