Merge "Add step to CiCd UI form"

This commit is contained in:
Jenkins 2016-05-16 10:27:54 +00:00 committed by Gerrit Code Review
commit 95e27c4467
2 changed files with 81 additions and 13 deletions

View File

@ -21,6 +21,19 @@ Properties:
Contract: $.class(opaas:Jenkins)
Usage: Out
ldapRootUser:
Contract: $.string().notNull()
ldapRootPass:
Contract: $.string().notNull()
ldapRootEmail:
Contract: $.string().notNull()
ldapUser:
Contract: $.string()
ldapPass:
Contract: $.string()
ldapEmail:
Contract: $.string()
instance_name:
Contract: $.string().notNull()
flavor:
@ -45,10 +58,6 @@ Methods:
Body:
- $._environment.reporter.report($this, 'Deploying CI/CD')
- $user: 'user'
- $password: 'P@ssw0rd'
- $mail: 'user@mail.com'
# OpenLDAP
- If: $this.ldap = null
Then:
@ -64,12 +73,12 @@ Methods:
name => 'OpenLDAP',
instance => $ldapInstance,
domain => 'infra.local',
ldapRootUser => 'root',
ldapRootPass => 'openstack',
ldapRootEmail => 'root@mail.com',
ldapUser => $user,
ldapPass => $password,
ldapEmail => $mail)
ldapRootUser => $.ldapRootUser,
ldapRootPass => $.ldapRootPass,
ldapRootEmail => $.ldapRootEmail,
ldapUser => $.ldapUser,
ldapPass => $.ldapPass,
ldapEmail => $.ldapEmail)
# Gerrit
- If: $this.gerrit = null
@ -93,7 +102,7 @@ Methods:
Then:
- $._environment.reporter.report($this,
'Jenkins credentials user={0}, password={1}'.format(
$user, $password))
$.ldapUser, $.ldapPass))
- $jenkinsInstanceName: concat($.instance_name, '-jenkins')
- $jenkinsInstance: new(puppet:PuppetInstance, $._environment,
name => $jenkinsInstanceName,
@ -108,8 +117,8 @@ Methods:
ldap => $this.ldap,
gerrit => $this.gerrit,
cfplugin => false,
gitUser => $user,
gitEmail => $mail)
gitUser => $.ldapUser,
gitEmail => $.ldapEmail)
# Deploy all
- Parallel:

View File

@ -4,6 +4,12 @@ Application:
?:
type: io.murano.opaas.CiCdEnvironment
name: 'CI/CD'
ldapRootUser: $.appConfiguration.ldapRootUser
ldapRootPass: $.appConfiguration.ldapRootPass
ldapRootEmail: $.appConfiguration.ldapRootEmail
ldapUser: $.appConfiguration.ldapUser
ldapPass: $.appConfiguration.ldapPass
ldapEmail: $.appConfiguration.ldapEmail
instance_name: generateHostname($.instanceConfiguration.unitNamingPattern, 1)
flavor: $.instanceConfiguration.flavor
image: $.instanceConfiguration.osImage
@ -12,6 +18,59 @@ Application:
assignFloatingIp: true
Forms:
- appConfiguration:
fields:
- name: ldapRootUser
type: string
initial: root
label: Root Username
descriptionTitle: Root Username
description: >-
Please, provide name for root user
- name: ldapRootPass
type: password
initial: Openst@ck0
label: Root Password
descriptionTitle: Root Password
description: >-
Please, provide password for root user
- name: ldapRootEmail
type: string
initial: root@mail.com
regexpValidator: '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'
errorMessages:
invalid: Please provide valid email address.
label: Root User Email
descriptionTitle: Root User Email
description: >-
Please, provide email for root user
- name: ldapUser
type: string
initial: user
label: Username
required: false
descriptionTitle: Regular User Name
description: >-
Please, provide name for regular user
- name: ldapPass
type: password
initial: P@ssw0rd
label: Password
required: false
descriptionTitle: Regular User Password
description: >-
Please, provide password for regular user
- name: ldapEmail
type: string
initial: user@mail.com
regexpValidator: '^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$'
errorMessages:
invalid: Please provide valid email address.
label: Email
required: false
descriptionTitle: Regular user Email
description: >-
Please, provide regular user email
- instanceConfiguration:
fields:
- name: title