Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Andrew Lyons
pipeline
Commits
5799c71b
Commit
5799c71b
authored
Dec 15, 2017
by
Andrew Nicols
Browse files
Create a class for Repo under test
parent
bdd68d09
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/org/moodle/ci/Target.groovy
0 → 100644
View file @
5799c71b
package
org.moodle.ci
;
class
Target
{
protected
String
url
protected
String
credentialsId
protected
String
branch
}
src/org/moodle/ci/repositories/Repository.groovy
View file @
5799c71b
...
...
@@ -3,7 +3,13 @@ package org.moodle.ci.repositories;
class
Repository
{
protected
String
url
protected
String
credentialsId
def
getUrl
()
{
return
url
}
def
getCredential
()
{
return
credentialsId
}
}
src/org/moodle/ci/repositories/Security.groovy
0 → 100644
View file @
5799c71b
package
org.moodle.ci.repositories
;
class
Security
extends
Repository
{
Security
()
{
this
.
url
=
"git@git.in.moodle.com:integration/security.git"
this
.
credentialsId
=
'security'
}
}
vars/runTask.groovy
View file @
5799c71b
def
call
(
String
task
,
String
branch
,
String
repo
,
String
phpversion
,
String
database
,
Boolean
notify
)
{
def
call
(
String
task
,
org
.
moodle
.
ci
.
Target
Target
,
String
phpversion
,
String
database
,
Boolean
notify
)
{
pipeline
{
agent
{
label
'docker'
...
...
@@ -19,7 +19,7 @@ def call(String task, String branch, String repo, String phpversion, String data
$class
:
'GitSCM'
,
branches:
[
[
name:
"${branch}"
name:
"${
Target.
branch}"
]
],
doGenerateSubmoduleConfigurations:
false
,
...
...
@@ -39,9 +39,12 @@ def call(String task, String branch, String repo, String phpversion, String data
submoduleCfg:
[],
userRemoteConfigs:
[
[
url:
"${repo}"
]
url:
"${Target.repo}"
,
credentialsId:
"${Target.credentialsId}"
],
[
]
userRemoteConfigs:
[[
credentialsId:
'security'
,
url:
'a'
]]])
]
)
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment