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: ...@@ -241,13 +241,31 @@ master:
jobs: jobs:
# test: |- # test: |-
# <<xml here>> # <<xml here>>
demo-infra-jenkins-test: |- demo: |-
<?xml version='1.1' encoding='UTF-8'?> <?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/> <actions/>
<description></description> <description></description>
<displayName>demo-infra-jenkins-test</displayName> <displayName>demo</displayName>
<properties> <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"> <org.jenkinsci.plugins.docker.workflow.declarative.FolderConfig plugin="docker-workflow@1.23">
<dockerLabel></dockerLabel> <dockerLabel></dockerLabel>
<registry plugin="docker-commons@1.16"/> <registry plugin="docker-commons@1.16"/>
...@@ -255,17 +273,20 @@ master: ...@@ -255,17 +273,20 @@ master:
<org.csanchez.jenkins.plugins.kubernetes.KubernetesFolderProperty plugin="kubernetes@1.25.1"> <org.csanchez.jenkins.plugins.kubernetes.KubernetesFolderProperty plugin="kubernetes@1.25.1">
<permittedClouds/> <permittedClouds/>
</org.csanchez.jenkins.plugins.kubernetes.KubernetesFolderProperty> </org.csanchez.jenkins.plugins.kubernetes.KubernetesFolderProperty>
<jenkins.branch.NoTriggerOrganizationFolderProperty>
<branches>.*</branches>
</jenkins.branch.NoTriggerOrganizationFolderProperty>
</properties> </properties>
<folderViews class="jenkins.branch.MultiBranchProjectViewHolder" plugin="branch-api@2.5.5"> <folderViews class="jenkins.branch.OrganizationFolderViewHolder">
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/> <owner reference="../.."/>
</folderViews> </folderViews>
<healthMetrics> <healthMetrics>
<com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric plugin="cloudbees-folder@6.12"> <com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric plugin="cloudbees-folder@6.12">
<nonRecursive>false</nonRecursive> <nonRecursive>false</nonRecursive>
</com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric> </com.cloudbees.hudson.plugins.folder.health.WorstChildHealthMetric>
</healthMetrics> </healthMetrics>
<icon class="jenkins.branch.MetadataActionFolderIcon" plugin="branch-api@2.5.5"> <icon class="jenkins.branch.MetadataActionFolderIcon">
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/> <owner class="jenkins.branch.OrganizationFolder" reference="../.."/>
</icon> </icon>
<orphanedItemStrategy class="com.cloudbees.hudson.plugins.folder.computed.DefaultOrphanedItemStrategy" plugin="cloudbees-folder@6.12"> <orphanedItemStrategy class="com.cloudbees.hudson.plugins.folder.computed.DefaultOrphanedItemStrategy" plugin="cloudbees-folder@6.12">
<pruneDeadBranches>true</pruneDeadBranches> <pruneDeadBranches>true</pruneDeadBranches>
...@@ -274,34 +295,44 @@ master: ...@@ -274,34 +295,44 @@ master:
</orphanedItemStrategy> </orphanedItemStrategy>
<triggers> <triggers>
<com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.12"> <com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger plugin="cloudbees-folder@6.12">
<spec>* * * * *</spec> <spec>H H/4 * * *</spec>
<interval>60000</interval> <interval>86400000</interval>
</com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger> </com.cloudbees.hudson.plugins.folder.computed.PeriodicFolderTrigger>
</triggers> </triggers>
<disabled>false</disabled> <disabled>false</disabled>
<sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api@2.5.5"> <navigators>
<data> <io.jenkins.plugins.gitlabbranchsource.GitLabSCMNavigator plugin="gitlab-branch-source@1.4.6">
<jenkins.branch.BranchSource> <projectOwner>demo</projectOwner>
<source class="jenkins.plugins.git.GitSCMSource" plugin="git@4.2.0"> <serverName>gitlab-joaolino.com</serverName>
<id>c689a231-de4b-41e9-8683-205cc0fd94af</id> <credentialsId></credentialsId>
<remote>https://www.joaolino.com/gitlab/demo/demo-infra-jenkins-test</remote> <traits>
<credentialsId></credentialsId> <io.jenkins.plugins.gitlabbranchsource.BranchDiscoveryTrait>
<traits> <strategyId>1</strategyId>
<jenkins.plugins.git.traits.BranchDiscoveryTrait/> </io.jenkins.plugins.gitlabbranchsource.BranchDiscoveryTrait>
</traits> <io.jenkins.plugins.gitlabbranchsource.OriginMergeRequestDiscoveryTrait>
</source> <strategyId>1</strategyId>
<strategy class="jenkins.branch.DefaultBranchPropertyStrategy"> </io.jenkins.plugins.gitlabbranchsource.OriginMergeRequestDiscoveryTrait>
<properties class="empty-list"/> <io.jenkins.plugins.gitlabbranchsource.ForkMergeRequestDiscoveryTrait>
</strategy> <strategyId>1</strategyId>
</jenkins.branch.BranchSource> <trust class="io.jenkins.plugins.gitlabbranchsource.ForkMergeRequestDiscoveryTrait$TrustPermission"/>
</data> </io.jenkins.plugins.gitlabbranchsource.ForkMergeRequestDiscoveryTrait>
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/> </traits>
</sources> <navigatorProjects>
<factory class="org.jenkinsci.plugins.workflow.multibranch.WorkflowBranchProjectFactory"> <string>demo/demo-infra-jenkins</string>
<owner class="org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject" reference="../.."/> <string>demo/demo-infra-jenkins-test</string>
<scriptPath>Jenkinsfile</scriptPath> <string>demo/demo-infra</string>
</factory> </navigatorProjects>
</org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject> <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>
</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, # 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. # 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: ...@@ -318,6 +349,25 @@ master:
welcome-message: | welcome-message: |
jenkins: jenkins:
systemMessage: Welcome to joaolino.com demo CI\CD server. This Jenkins is configured and managed 'as code'. 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: | # welcome-message: |
# jenkins: # jenkins:
# systemMessage: Welcome to our CI\CD server. This Jenkins is configured and managed 'as code'. # 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