Apostolos Fanakis
5 years ago
3 changed files with 126 additions and 6 deletions
@ -0,0 +1,120 @@ |
|||||
|
<?xml version='1.1' encoding='UTF-8'?> |
||||
|
<project> |
||||
|
<description></description> |
||||
|
<keepDependencies>false</keepDependencies> |
||||
|
<properties> |
||||
|
<hudson.plugins.jira.JiraProjectProperty plugin="jira@3.0.13"/> |
||||
|
<com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty plugin="gitlab-plugin@1.5.13"> |
||||
|
<gitLabConnection>apella</gitLabConnection> |
||||
|
</com.dabsquared.gitlabjenkins.connection.GitLabConnectionProperty> |
||||
|
<hudson.model.ParametersDefinitionProperty> |
||||
|
<parameterDefinitions> |
||||
|
<hudson.model.StringParameterDefinition> |
||||
|
<name>gitlabSourceBranch</name> |
||||
|
<description></description> |
||||
|
<defaultValue>master</defaultValue> |
||||
|
<trim>false</trim> |
||||
|
</hudson.model.StringParameterDefinition> |
||||
|
<hudson.model.StringParameterDefinition> |
||||
|
<name>gitlabTargetBranch</name> |
||||
|
<description></description> |
||||
|
<defaultValue>master</defaultValue> |
||||
|
<trim>false</trim> |
||||
|
</hudson.model.StringParameterDefinition> |
||||
|
</parameterDefinitions> |
||||
|
</hudson.model.ParametersDefinitionProperty> |
||||
|
<EnvInjectJobProperty plugin="envinject@2.3.0"> |
||||
|
<info> |
||||
|
<secureGroovyScript plugin="script-security@1.71"> |
||||
|
<script>import hudson.model.* |
||||
|
def env = Thread.currentThread()?.executable.parent.builds[0].properties.get('envVars') |
||||
|
def map = [:] |
||||
|
|
||||
|
if (env['gitlabSourceBranch'] != null) { |
||||
|
map['sourceBranch'] = env['gitlabSourceBranch'] |
||||
|
} |
||||
|
|
||||
|
if (env['gitlabTargetBranch'] != null) { |
||||
|
|
||||
|
def gitlabTargetBranchIsEmpty = !(true && (env['gitlabTargetBranch'])) |
||||
|
|
||||
|
if (gitlabTargetBranchIsEmpty && env['gitlabSourceBranch'] != null) { |
||||
|
// User left the option empty, try to use the gitlabSourceBranch instead |
||||
|
map['gitlabTargetBranch'] = env['gitlabSourceBranch'] |
||||
|
map['targetBranch'] = env['gitlabSourceBranch'] |
||||
|
} else { |
||||
|
map['targetBranch'] = env['gitlabTargetBranch'] |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return map</script> |
||||
|
<sandbox>false</sandbox> |
||||
|
</secureGroovyScript> |
||||
|
<loadFilesFromMaster>false</loadFilesFromMaster> |
||||
|
</info> |
||||
|
<on>true</on> |
||||
|
<keepJenkinsSystemVariables>true</keepJenkinsSystemVariables> |
||||
|
<keepBuildVariables>true</keepBuildVariables> |
||||
|
<overrideBuildParameters>true</overrideBuildParameters> |
||||
|
</EnvInjectJobProperty> |
||||
|
</properties> |
||||
|
<scm class="hudson.plugins.git.GitSCM" plugin="git@4.2.2"> |
||||
|
<configVersion>2</configVersion> |
||||
|
<userRemoteConfigs> |
||||
|
<hudson.plugins.git.UserRemoteConfig> |
||||
|
<url>git@gitlab.com:Apostolof/testapella.git</url> |
||||
|
<credentialsId>gitlab-ssh-key</credentialsId> |
||||
|
</hudson.plugins.git.UserRemoteConfig> |
||||
|
</userRemoteConfigs> |
||||
|
<branches> |
||||
|
<hudson.plugins.git.BranchSpec> |
||||
|
<name>origin/${gitlabSourceBranch}</name> |
||||
|
</hudson.plugins.git.BranchSpec> |
||||
|
</branches> |
||||
|
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> |
||||
|
<submoduleCfg class="list"/> |
||||
|
<extensions> |
||||
|
<hudson.plugins.git.extensions.impl.PreBuildMerge> |
||||
|
<options> |
||||
|
<mergeRemote>origin</mergeRemote> |
||||
|
<mergeTarget>${gitlabTargetBranch}</mergeTarget> |
||||
|
<mergeStrategy>default</mergeStrategy> |
||||
|
<fastForwardMode>FF</fastForwardMode> |
||||
|
</options> |
||||
|
</hudson.plugins.git.extensions.impl.PreBuildMerge> |
||||
|
</extensions> |
||||
|
</scm> |
||||
|
<canRoam>true</canRoam> |
||||
|
<disabled>false</disabled> |
||||
|
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> |
||||
|
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> |
||||
|
<triggers> |
||||
|
<com.dabsquared.gitlabjenkins.GitLabPushTrigger plugin="gitlab-plugin@1.5.13"> |
||||
|
<spec></spec> |
||||
|
<triggerOnPush>true</triggerOnPush> |
||||
|
<triggerOnMergeRequest>true</triggerOnMergeRequest> |
||||
|
<triggerOnPipelineEvent>false</triggerOnPipelineEvent> |
||||
|
<triggerOnAcceptedMergeRequest>false</triggerOnAcceptedMergeRequest> |
||||
|
<triggerOnClosedMergeRequest>false</triggerOnClosedMergeRequest> |
||||
|
<triggerOnApprovedMergeRequest>false</triggerOnApprovedMergeRequest> |
||||
|
<triggerOpenMergeRequestOnPush>never</triggerOpenMergeRequestOnPush> |
||||
|
<triggerOnNoteRequest>false</triggerOnNoteRequest> |
||||
|
<noteRegex>Jenkins please retry a build</noteRegex> |
||||
|
<ciSkip>true</ciSkip> |
||||
|
<skipWorkInProgressMergeRequest>true</skipWorkInProgressMergeRequest> |
||||
|
<setBuildDescription>true</setBuildDescription> |
||||
|
<branchFilterType>All</branchFilterType> |
||||
|
<includeBranchesSpec></includeBranchesSpec> |
||||
|
<excludeBranchesSpec></excludeBranchesSpec> |
||||
|
<sourceBranchRegex></sourceBranchRegex> |
||||
|
<targetBranchRegex></targetBranchRegex> |
||||
|
<secretToken>{AQAAABAAAAAQaN91UOqWLcMzvwxv5X3jhRSWceLHBxXjS/TMSxzNclQ=}</secretToken> |
||||
|
<pendingBuildName></pendingBuildName> |
||||
|
<cancelPendingBuildsOnUpdate>false</cancelPendingBuildsOnUpdate> |
||||
|
</com.dabsquared.gitlabjenkins.GitLabPushTrigger> |
||||
|
</triggers> |
||||
|
<concurrentBuild>false</concurrentBuild> |
||||
|
<builders/> |
||||
|
<publishers/> |
||||
|
<buildWrappers/> |
||||
|
</project> |
Loading…
Reference in new issue