[Jenkins] Set User, Mail for Jenkins in meta App

Previously we had default values in Jenkins Application directly, but
these defaults are used only for demo and testing. Current patch remove
these default values and move them to meta CICD Application.

Currently it's the same emal and user as used for authorization in
Jenkins and Gerrit. In the future it may be separate user/mail for
independent work Jenkins with Gerrit.

Change-Id: Id13c407225f4fbe766567207a40fb606bb04a085
This commit is contained in:
Sergey Kraynev 2016-05-10 17:49:56 +03:00
parent eba9931ba5
commit 0149a656ca
2 changed files with 6 additions and 16 deletions

View File

@ -88,6 +88,7 @@ Methods:
ldap => $this.ldap)
# Jenkins
# set user and mail for accessing to Gerrit from Jenkins
- If: $this.jenkins = null
Then:
- $._environment.reporter.report($this,
@ -105,7 +106,9 @@ Methods:
name => 'Jenkins',
instance => $jenkinsInstance,
ldap => $this.ldap,
cfplugin => false)
cfplugin => false,
gitUser => $user,
gitEmail => $mail)
# Deploy all
- Parallel:

View File

@ -137,21 +137,8 @@ Methods:
- gitEmail:
Contract: $.string()
Body:
# Set defaults if not provided.
- If: $gitUser in ['', null]
Then:
- $gitUsername: 'user'
Else:
- $gitUsername: $gitUser
- If: $gitEmail in ['', null]
Then:
- $gitUserEmail: 'user@mirantis.test'
Else:
- $gitUserEmail: $gitEmail
- $.instance.setHieraValue('git_user', $gitUsername)
- $.instance.setHieraValue('git_user_email', $gitUserEmail)
- $.instance.setHieraValue('git_user', $gitUser)
- $.instance.setHieraValue('git_user_email', $gitEmail)
- $resources: new(sys:Resources)
- $._environment.reporter.report($this, 'Configure Jenkins Git plugin...')
- $template: $resources.yaml('ConfigureGit.template')