Commit ee5d5d77 authored by João Lino's avatar João Lino

Add gitlab configuration and job for demo group.

parent ebf92ccd
......@@ -241,13 +241,31 @@ master:
jobs:
# test: |-
# <<xml here>>
demo-infra-jenkins-test: |-
demo: |-
<?xml version='1.1' encoding='UTF-8'?>
<org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject plugin="workflow-multibranch@2.21">
<jenkins.branch.OrganizationFolder plugin="branch-api@2.5.6">
<actions/>
<description></description>
<displayName>demo-infra-jenkins-test</displayName>
<displayName>demo</displayName>
<properties>
<jenkins.branch.OrganizationChildHealthMetricsProperty>
<templates>
<com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric plugin="cloudbees-folder@6.12">
<nonRecursive>false</nonRecursive>
</com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric>
</templates>
</jenkins.branch.OrganizationChildHealthMetricsProperty>
<jenkins.branch.OrganizationChildOrphanedItemsProperty>
<strategy class="jenkins.branch.OrganizationChildOrphanedItemsProperty$Inherit"/>
</jenkins.branch.OrganizationChildOrphanedItemsProperty>
<jenkins.branch.OrganizationChildTriggersProperty>
<templates>
<com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.12">
<spec>H H/4 * * *</spec>
<interval>86400000</interval>
</com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
</templates>
</jenkins.branch.OrganizationChildTriggersProperty>
<org.jenkinsci.plugins.docker.workflow.declarative.FolderConfig plugin="docker-workflow@1.23">
<dockerLabel></dockerLabel>
<registry plugin="docker-commons@1.16"/>
......@@ -255,17 +273,20 @@ master:
<org.csanchez.jenkins.plugins.kubernetes.KubernetesFolderProperty plugin="kubernetes@1.25.1">
<permittedClouds/>
</org.csanchez.jenkins.plugins.kubernetes.KubernetesFolderProperty>
<jenkins.branch.NoTriggerOrganizationFolderProperty>
<branches>.*</branches>
</jenkins.branch.NoTriggerOrganizationFolderProperty>
</properties>
<folderViews class="jenkins.branch.MultiBranchProjectViewHolder" plugin="branch-api@2.5.5">
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
<folderViews class="jenkins.branch.OrganizationFolderViewHolder">
<owner reference="../.."/>
</folderViews>
<healthMetrics>
<com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric plugin="cloudbees-folder@6.12">
<nonRecursive>false</nonRecursive>
</com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric>
</healthMetrics>
<icon class="jenkins.branch.MetadataActionFolderIcon" plugin="branch-api@2.5.5">
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
<icon class="jenkins.branch.MetadataActionFolderIcon">
<owner class="jenkins.branch.OrganizationFolder" reference="../.."/>
</icon>
<orphanedItemStrategy class="com.cloudbees.hudson.plugins.folder.computed.DefaultOrphanedItemStrategy" plugin="cloudbees-folder@6.12">
<pruneDeadBranches>true</pruneDeadBranches>
......@@ -274,34 +295,44 @@ master:
</orphanedItemStrategy>
<triggers>
<com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.12">
<spec>* * * * *</spec>
<interval>60000</interval>
<spec>H H/4 * * *</spec>
<interval>86400000</interval>
</com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
</triggers>
<disabled>false</disabled>
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api@2.5.5">
<data>
<jenkins.branch.BranchSource>
<source class="jenkins.plugins.git.GitSCMSource" plugin="git@4.2.0">
<id>c689a231-de4b-41e9-8683-205cc0fd94af</id>
<remote>https://www.joaolino.com/gitlab/demo/demo-infra-jenkins-test</remote>
<navigators>
<io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator plugin="gitlab-branch-source@1.4.6">
<projectOwner>demo</projectOwner>
<serverName>gitlab-joaolino.com</serverName>
<credentialsId></credentialsId>
<traits>
<jenkins.plugins.git.traits.BranchDiscoveryTrait/>
<io.jenkins.plugins.gitlabbranchsource.BranchDiscoveryTrait>
<strategyId>1</strategyId>
</io.jenkins.plugins.gitlabbranchsource.BranchDiscoveryTrait>
<io.jenkins.plugins.gitlabbranchsource.OriginMergeRequestDiscoveryTrait>
<strategyId>1</strategyId>
</io.jenkins.plugins.gitlabbranchsource.OriginMergeRequestDiscoveryTrait>
<io.jenkins.plugins.gitlabbranchsource.ForkMergeRequestDiscoveryTrait>
<strategyId>1</strategyId>
<trust class="io.jenkins.plugins.gitlabbranchsource.ForkMergeRequestDiscoveryTrait$TrustPermission"/>
</io.jenkins.plugins.gitlabbranchsource.ForkMergeRequestDiscoveryTrait>
</traits>
</source>
<strategy class="jenkins.branch.DefaultBranchPropertyStrategy">
<properties class="empty-list"/>
</strategy>
</jenkins.branch.BranchSource>
</data>
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
</sources>
<factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory">
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/>
<navigatorProjects>
<string>demo/demo-infra-jenkins</string>
<string>demo/demo-infra-jenkins-test</string>
<string>demo/demo-infra</string>
</navigatorProjects>
<isGroup>true</isGroup>
<wantSubGroupProjects>false</wantSubGroupProjects>
</io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator>
</navigators>
<projectFactories>
<org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProjectFactory plugin="workflow-multibranch@2.21">
<scriptPath>Jenkinsfile</scriptPath>
</factory>
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject>
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProjectFactory>
</projectFactories>
<buildStrategies/>
</jenkins.branch.OrganizationFolder>
# Below is the implementation of Jenkins Configuration as Code. Add a key under configScripts for each configuration area,
# where each corresponds to a plugin or section of the UI. Each key (prior to | character) is just a label, and can be any value.
......@@ -318,6 +349,25 @@ master:
welcome-message: |
jenkins:
systemMessage: Welcome to joaolino.com demo CI\CD server. This Jenkins is configured and managed 'as code'.
gitlab: |
credentials:
system:
domainCredentials:
- credentials:
- gitlabPersonalAccessToken:
scope: SYSTEM
id: "service-config-token"
token: "b7VEShAsLQPumFH2-Psh" # gitlab personal access token
description: "The user that manager the gitlab integration for CI/CD projects."
unclassified:
gitLabServers:
servers:
- credentialsId: "service-config-token" # same as id specified for gitlab personal access token credentials
manageWebHooks: true
manageSystemHooks: true # access token should have admin access to set system hooks
name: "gitlab-joaolino.com"
serverUrl: "https://www.joaolino.com/gitlab"
# welcome-message: |
# jenkins:
# systemMessage: Welcome to our CI\CD server. This Jenkins is configured and managed 'as code'.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment