modified version of jenkins debian glue (https://github.com/mika/jenkins-debian-glue) for devuan
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

652 lines
20 KiB

  1. # jenkins::plugin::install is based on rtyler's
  2. # https://github.com/jenkinsci/puppet-jenkins/blob/master/manifests/plugin.pp
  3. define jenkins::plugin::install($version=0, $force=0) {
  4. $plugin = "${name}.hpi"
  5. $plugin_parent_dir = '/var/lib/jenkins'
  6. $plugin_dir = '/var/lib/jenkins/plugins'
  7. if ($version != 0) {
  8. $base_url = "http://updates.jenkins-ci.org/download/plugins/${name}/${version}/"
  9. }
  10. else {
  11. $base_url = 'http://updates.jenkins-ci.org/latest/'
  12. }
  13. if (!defined(File[$plugin_dir])) {
  14. file {
  15. [$plugin_parent_dir, $plugin_dir]:
  16. ensure => directory,
  17. owner => 'jenkins',
  18. }
  19. }
  20. if ($force != 0) {
  21. exec { "download-${name}" :
  22. command => "touch $plugin_dir/${name}.jpi.pinned; wget --no-check-certificate -O $plugin_dir/${name}.jpi ${base_url}${plugin}",
  23. cwd => $plugin_dir,
  24. require => File[$plugin_dir],
  25. path => ['/usr/bin', '/usr/sbin',],
  26. user => 'jenkins',
  27. notify => Service['jenkins'],
  28. }
  29. } else {
  30. exec { "download-${name}" :
  31. command => "wget --no-check-certificate ${base_url}${plugin}",
  32. cwd => $plugin_dir,
  33. require => File[$plugin_dir],
  34. path => ['/usr/bin', '/usr/sbin',],
  35. user => 'jenkins',
  36. unless => "test -f ${plugin_dir}/${plugin}",
  37. notify => Service['jenkins'],
  38. }
  39. }
  40. }
  41. exec { 'apt-get_update':
  42. refreshonly => true,
  43. path => '/bin:/usr/bin',
  44. command => 'apt-get update',
  45. }
  46. define apt::key($ensure = present, $source) {
  47. case $ensure {
  48. present: {
  49. exec { "/usr/bin/wget -O - '$source' | /usr/bin/apt-key add -":
  50. unless => "apt-key list | grep -Fqe '${name}'",
  51. path => '/bin:/usr/bin',
  52. before => Exec['apt-get_update'],
  53. notify => Exec['apt-get_update'],
  54. }
  55. }
  56. absent: {
  57. exec {"/usr/bin/apt-key del ${name}":
  58. onlyif => "apt-key list | grep -Fqe '${name}'",
  59. }
  60. }
  61. }
  62. }
  63. if $ec2_public_ipv4 {
  64. $jenkins_server = "$ec2_public_ipv4"
  65. } elsif $ipaddress {
  66. $jenkins_server = "$ipaddress"
  67. } else {
  68. $jenkins_server = "YOUR_JENKINS_SERVER"
  69. }
  70. class jenkins::repos {
  71. apt::key { 'D50582E6':
  72. ensure => present,
  73. source => 'http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key',
  74. }
  75. file { '/etc/apt/sources.list.d/jenkins.list':
  76. ensure => present,
  77. notify => Exec['refresh-apt-jenkins'],
  78. content => "deb http://pkg.jenkins-ci.org/debian-stable binary/\n",
  79. require => Apt::Key['D50582E6'],
  80. }
  81. exec { 'refresh-apt-jenkins':
  82. refreshonly => true,
  83. require => [
  84. File['/etc/apt/sources.list.d/jenkins.list'],
  85. Apt::Key['D50582E6'],
  86. ],
  87. path => ['/usr/bin', '/usr/sbin'],
  88. command => 'apt-get update',
  89. }
  90. apt::key { '52D4A654':
  91. ensure => present,
  92. source => 'http://jenkins.grml.org/debian/C525F56752D4A654.asc',
  93. }
  94. file { '/etc/apt/sources.list.d/jenkins-debian-glue.list':
  95. ensure => present,
  96. notify => Exec['refresh-apt-jenkins-debian-glue'],
  97. content => "deb http://jenkins.grml.org/debian jenkins-debian-glue main\n",
  98. require => Apt::Key['52D4A654'],
  99. }
  100. exec { 'refresh-apt-jenkins-debian-glue':
  101. refreshonly => true,
  102. require => [
  103. File['/etc/apt/sources.list.d/jenkins-debian-glue.list'],
  104. Apt::Key['52D4A654'],
  105. ],
  106. path => ['/usr/bin', '/usr/sbin'],
  107. command => 'apt-get update';
  108. }
  109. }
  110. class jenkins::software {
  111. jenkins::plugin::install { 'copyartifact':
  112. require => Package['jenkins'],
  113. }
  114. # required for recent versions of ssh-agent
  115. jenkins::plugin::install { 'credentials':
  116. force => '1', # see https://issues.jenkins-ci.org/browse/JENKINS-19927
  117. require => Package['jenkins'],
  118. }
  119. # required for recent versions of credentials
  120. jenkins::plugin::install { 'icon-shim':
  121. require => Package['jenkins'],
  122. }
  123. # required for recent versions of credentials
  124. jenkins::plugin::install { 'ssh-credentials':
  125. require => Package['jenkins'],
  126. }
  127. jenkins::plugin::install { 'git-client':
  128. require => Package['jenkins'],
  129. }
  130. jenkins::plugin::install { 'git':
  131. require => Package['jenkins'],
  132. }
  133. # required for recent versions of git
  134. jenkins::plugin::install { 'scm-api':
  135. require => Package['jenkins'],
  136. }
  137. # required for recent versions of git-client
  138. jenkins::plugin::install { 'ssh-agent':
  139. require => Package['jenkins'],
  140. }
  141. # required for recent versions of ssh-agent
  142. jenkins::plugin::install { 'workflow-step-api':
  143. require => Package['jenkins'],
  144. }
  145. jenkins::plugin::install { 'tap':
  146. require => Package['jenkins'],
  147. }
  148. jenkins::plugin::install { 'timestamper':
  149. require => Package['jenkins'],
  150. }
  151. jenkins::plugin::install { 'ws-cleanup':
  152. require => Package['jenkins'],
  153. }
  154. package { 'default-jre-headless':
  155. ensure => present,
  156. }
  157. # fix java headless issue, might also require
  158. # sudo java -jar /usr/lib/jvm/java-6-openjdk-common/jre/lib/compilefontconfig.jar \
  159. # /etc/java-6-openjdk/fontconfig.properties \
  160. # /usr/lib/jvm/java-6-openjdk-common/jre/lib/fontconfig.bfc
  161. package { 'ttf-dejavu':
  162. ensure => present,
  163. }
  164. package { 'jenkins':
  165. ensure => present,
  166. require => [
  167. File['/etc/apt/sources.list.d/jenkins.list'],
  168. File['/etc/sudoers.d/jenkins'],
  169. Exec['refresh-apt-jenkins'],
  170. Package['default-jre-headless'],
  171. ]
  172. }
  173. package { [ 'jenkins-debian-glue',
  174. 'jenkins-debian-glue-buildenv' ]:
  175. ensure => present,
  176. require => [
  177. File['/etc/apt/sources.list.d/jenkins-debian-glue.list'],
  178. Exec['refresh-apt-jenkins-debian-glue'],
  179. ]
  180. }
  181. service { 'jenkins':
  182. ensure => running,
  183. require => Package['jenkins'],
  184. }
  185. package { 'sudo':
  186. ensure => present,
  187. }
  188. file { '/etc/sudoers.d/jenkins':
  189. mode => '0440',
  190. content => '## Deployed via jenkins_debian_glue.pp
  191. # Make sure DEB_* options reach cowbuilder, like e.g.:
  192. # export DEB_BUILD_OPTIONS="parallel=8" /usr/bin/build-and-provide-package
  193. Defaults env_keep+="DEB_* DIST ARCH ADT"
  194. # for *-binaries job
  195. jenkins ALL=NOPASSWD: /usr/sbin/cowbuilder, /usr/sbin/chroot
  196. # for *-piuparts job
  197. jenkins ALL=NOPASSWD: /usr/sbin/piuparts, /usr/sbin/debootstrap, /usr/bin/piuparts_wrapper
  198. ',
  199. require => Package['sudo'],
  200. }
  201. }
  202. class jenkins::reprepro {
  203. file { '/srv/repository':
  204. ensure => directory,
  205. mode => '0755',
  206. owner => 'jenkins',
  207. require => Package['jenkins'],
  208. }
  209. }
  210. class jenkins::config {
  211. file { '/var/lib/jenkins/.gitconfig':
  212. ensure => present,
  213. mode => '0644',
  214. owner => 'jenkins',
  215. content =>'[user]
  216. email = jenkins@example.org
  217. name = Jenkins User
  218. ',
  219. require => Package['jenkins'],
  220. }
  221. file { '/var/lib/jenkins/jobs':
  222. ensure => directory,
  223. mode => '0755',
  224. owner => 'jenkins',
  225. require => Package['jenkins'],
  226. }
  227. file { '/var/lib/jenkins/jobs/jenkins-debian-glue-source':
  228. ensure => directory,
  229. mode => '0755',
  230. owner => 'jenkins',
  231. require => Package['jenkins'],
  232. }
  233. file { '/var/lib/jenkins/jobs/jenkins-debian-glue-source/config.xml':
  234. ensure => present,
  235. mode => '0644',
  236. owner => 'jenkins',
  237. require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-source'],
  238. notify => Service['jenkins'],
  239. content => "<?xml version='1.0' encoding='UTF-8'?>
  240. <project>
  241. <actions/>
  242. <description>Build Debian source package of jenkins-debian-glue</description>
  243. <keepDependencies>false</keepDependencies>
  244. <properties/>
  245. <scm class='hudson.plugins.git.GitSCM'>
  246. <configVersion>2</configVersion>
  247. <userRemoteConfigs>
  248. <hudson.plugins.git.UserRemoteConfig>
  249. <name></name>
  250. <refspec></refspec>
  251. <url>git://github.com/mika/jenkins-debian-glue.git</url>
  252. </hudson.plugins.git.UserRemoteConfig>
  253. </userRemoteConfigs>
  254. <branches>
  255. <hudson.plugins.git.BranchSpec>
  256. <name>master</name>
  257. </hudson.plugins.git.BranchSpec>
  258. </branches>
  259. <disableSubmodules>false</disableSubmodules>
  260. <recursiveSubmodules>false</recursiveSubmodules>
  261. <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
  262. <authorOrCommitter>false</authorOrCommitter>
  263. <clean>false</clean>
  264. <wipeOutWorkspace>false</wipeOutWorkspace>
  265. <pruneBranches>false</pruneBranches>
  266. <remotePoll>false</remotePoll>
  267. <ignoreNotifyCommit>false</ignoreNotifyCommit>
  268. <buildChooser class='hudson.plugins.git.util.DefaultBuildChooser'/>
  269. <gitTool>Default</gitTool>
  270. <submoduleCfg class='list'/>
  271. <relativeTargetDir>source</relativeTargetDir>
  272. <reference></reference>
  273. <excludedRegions></excludedRegions>
  274. <excludedUsers></excludedUsers>
  275. <gitConfigName></gitConfigName>
  276. <gitConfigEmail></gitConfigEmail>
  277. <skipTag>false</skipTag>
  278. <includedRegions></includedRegions>
  279. <scmName></scmName>
  280. </scm>
  281. <canRoam>true</canRoam>
  282. <disabled>false</disabled>
  283. <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  284. <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  285. <triggers class='vector'/>
  286. <concurrentBuild>false</concurrentBuild>
  287. <builders>
  288. <hudson.tasks.Shell>
  289. <command>rm -f ./* || true</command>
  290. </hudson.tasks.Shell>
  291. <hudson.tasks.Shell>
  292. <command># when using git:
  293. /usr/bin/generate-git-snapshot
  294. # when using subversion:
  295. # /usr/bin/generate-svn-snapshot</command>
  296. </hudson.tasks.Shell>
  297. <hudson.tasks.Shell>
  298. <command>mkdir -p report
  299. /usr/bin/lintian-junit-report *.dsc &gt; report/lintian.xml</command>
  300. </hudson.tasks.Shell>
  301. </builders>
  302. <publishers>
  303. <hudson.tasks.ArtifactArchiver>
  304. <artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt</artifacts>
  305. <latestOnly>false</latestOnly>
  306. </hudson.tasks.ArtifactArchiver>
  307. <hudson.tasks.Fingerprinter>
  308. <targets></targets>
  309. <recordBuildArtifacts>true</recordBuildArtifacts>
  310. </hudson.tasks.Fingerprinter>
  311. <hudson.tasks.BuildTrigger>
  312. <childProjects>jenkins-debian-glue-binaries</childProjects>
  313. <threshold>
  314. <name>SUCCESS</name>
  315. <ordinal>0</ordinal>
  316. <color>BLUE</color>
  317. </threshold>
  318. </hudson.tasks.BuildTrigger>
  319. <hudson.tasks.junit.JUnitResultArchiver>
  320. <testResults>**/lintian.xml</testResults>
  321. <keepLongStdio>false</keepLongStdio>
  322. <testDataPublishers/>
  323. </hudson.tasks.junit.JUnitResultArchiver>
  324. </publishers>
  325. <buildWrappers/>
  326. </project>
  327. "
  328. }
  329. file { '/var/lib/jenkins/jobs/jenkins-debian-glue-binaries':
  330. ensure => directory,
  331. mode => '0755',
  332. owner => 'jenkins',
  333. require => Package['jenkins'],
  334. }
  335. file { '/var/lib/jenkins/jobs/jenkins-debian-glue-binaries/config.xml':
  336. ensure => present,
  337. mode => '0644',
  338. owner => 'jenkins',
  339. require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-binaries'],
  340. notify => Service['jenkins'],
  341. content => "<?xml version='1.0' encoding='UTF-8'?>
  342. <matrix-project>
  343. <actions/>
  344. <description>&lt;p&gt;Build Debian binary packages of jenkins-debian-glue&lt;/p&gt;&#xd;
  345. &#xd;
  346. &lt;h2&gt;Usage instructions how to remotely access and use the repository&lt;/h2&gt;&#xd;
  347. &#xd;
  348. &lt;p&gt;Install apache webserver:&lt;/p&gt;&#xd;
  349. &#xd;
  350. &lt;pre&gt;&#xd;
  351. sudo apt-get install apache2&#xd;
  352. sudo ln -s /srv/repository /var/www/debian&#xd;
  353. &lt;/pre&gt;&#xd;
  354. &#xd;
  355. &lt;p&gt;Then access to this repository is available using the following sources.list entry:&lt;/p&gt;&#xd;
  356. &#xd;
  357. &lt;pre&gt;&#xd;
  358. deb http://${jenkins_server}/debian/ jenkins-debian-glue main&#xd;
  359. deb-src http://${jenkins_server}/debian/ jenkins-debian-glue main&#xd;
  360. &lt;/pre&gt;</description>
  361. <keepDependencies>false</keepDependencies>
  362. <properties/>
  363. <scm class='hudson.scm.NullSCM'/>
  364. <canRoam>true</canRoam>
  365. <disabled>false</disabled>
  366. <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  367. <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  368. <triggers class='vector'/>
  369. <concurrentBuild>false</concurrentBuild>
  370. <axes>
  371. <hudson.matrix.TextAxis>
  372. <name>architecture</name>
  373. <values>
  374. <string>$::architecture</string>
  375. </values>
  376. </hudson.matrix.TextAxis>
  377. </axes>
  378. <builders>
  379. <hudson.plugins.copyartifact.CopyArtifact>
  380. <projectName>jenkins-debian-glue-source</projectName>
  381. <filter>*</filter>
  382. <target></target>
  383. <selector class='hudson.plugins.copyartifact.TriggeredBuildSelector'>
  384. <fallbackToLastSuccessful>true</fallbackToLastSuccessful>
  385. </selector>
  386. </hudson.plugins.copyartifact.CopyArtifact>
  387. <hudson.tasks.Shell>
  388. <command>export POST_BUILD_HOOK=/usr/bin/jdg-debc
  389. /usr/bin/build-and-provide-package</command>
  390. </hudson.tasks.Shell>
  391. <hudson.tasks.Shell>
  392. <command>echo &quot;Listing packages inside the jenkins-debian-glue repository:&quot;
  393. /usr/bin/repository_checker --list-repos jenkins-debian-glue</command>
  394. </hudson.tasks.Shell>
  395. <hudson.tasks.Shell>
  396. <command>mkdir -p report
  397. /usr/bin/lintian-junit-report *.dsc &gt; report/lintian.xml</command>
  398. </hudson.tasks.Shell>
  399. </builders>
  400. <publishers>
  401. <hudson.tasks.ArtifactArchiver>
  402. <artifacts>*.gz,*.bz2,*.xz,*.deb,*.dsc,*.git,*.changes,lintian.txt</artifacts>
  403. <latestOnly>false</latestOnly>
  404. </hudson.tasks.ArtifactArchiver>
  405. <hudson.tasks.Fingerprinter>
  406. <targets></targets>
  407. <recordBuildArtifacts>true</recordBuildArtifacts>
  408. </hudson.tasks.Fingerprinter>
  409. <hudson.tasks.junit.JUnitResultArchiver>
  410. <testResults>**/lintian.xml</testResults>
  411. <keepLongStdio>false</keepLongStdio>
  412. <testDataPublishers/>
  413. </hudson.tasks.junit.JUnitResultArchiver>
  414. <hudson.tasks.BuildTrigger>
  415. <childProjects>jenkins-debian-glue-piuparts</childProjects>
  416. <threshold>
  417. <name>SUCCESS</name>
  418. <ordinal>0</ordinal>
  419. <color>BLUE</color>
  420. </threshold>
  421. </hudson.tasks.BuildTrigger>
  422. </publishers>
  423. <buildWrappers>
  424. <hudson.plugins.ws__cleanup.PreBuildCleanup>
  425. <deleteDirs>false</deleteDirs>
  426. </hudson.plugins.ws__cleanup.PreBuildCleanup>
  427. </buildWrappers>
  428. <executionStrategy class='hudson.matrix.DefaultMatrixExecutionStrategyImpl'>
  429. <runSequentially>true</runSequentially>
  430. </executionStrategy>
  431. </matrix-project>
  432. "
  433. }
  434. file { '/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts/':
  435. ensure => directory,
  436. mode => '0755',
  437. owner => 'jenkins',
  438. require => Package['jenkins'],
  439. }
  440. file { '/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts/config.xml':
  441. ensure => present,
  442. mode => '0644',
  443. owner => 'jenkins',
  444. require => File['/var/lib/jenkins/jobs/jenkins-debian-glue-piuparts'],
  445. notify => Service['jenkins'],
  446. content => "<?xml version='1.0' encoding='UTF-8'?>
  447. <project>
  448. <actions/>
  449. <description>Installation and upgrade tests for jenkins-debian-glue Debian packages</description>
  450. <keepDependencies>false</keepDependencies>
  451. <properties>
  452. <hudson.model.ParametersDefinitionProperty>
  453. <parameterDefinitions>
  454. <hudson.model.StringParameterDefinition>
  455. <name>architecture</name>
  456. <description></description>
  457. <defaultValue>$::architecture</defaultValue>
  458. </hudson.model.StringParameterDefinition>
  459. </parameterDefinitions>
  460. </hudson.model.ParametersDefinitionProperty>
  461. </properties>
  462. <scm class='hudson.scm.NullSCM'/>
  463. <canRoam>true</canRoam>
  464. <disabled>false</disabled>
  465. <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
  466. <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
  467. <triggers class='vector'/>
  468. <concurrentBuild>false</concurrentBuild>
  469. <builders>
  470. <hudson.plugins.copyartifact.CopyArtifact>
  471. <project>jenkins-debian-glue-binaries/architecture=\$architecture</project>
  472. <filter>*.deb</filter>
  473. <target>artifacts/</target>
  474. <selector class='hudson.plugins.copyartifact.TriggeredBuildSelector'>
  475. <fallbackToLastSuccessful>true</fallbackToLastSuccessful>
  476. </selector>
  477. <flatten>true</flatten>
  478. </hudson.plugins.copyartifact.CopyArtifact>
  479. <hudson.tasks.Shell>
  480. <command># sadly piuparts always returns with exit code 1 :((
  481. sudo piuparts_wrapper \${PWD}/artifacts/*.deb || true</command>
  482. </hudson.tasks.Shell>
  483. <hudson.tasks.Shell>
  484. <command>piuparts_tap piuparts.txt &gt; piuparts.tap</command>
  485. </hudson.tasks.Shell>
  486. </builders>
  487. <publishers>
  488. <org.tap4j.plugin.TapPublisher>
  489. <testResults>piuparts.tap</testResults>
  490. <failIfNoResults>false</failIfNoResults>
  491. <failedTestsMarkBuildAsFailure>false</failedTestsMarkBuildAsFailure>
  492. <outputTapToConsole>false</outputTapToConsole>
  493. <enableSubtests>true</enableSubtests>
  494. <discardOldReports>false</discardOldReports>
  495. <todoIsFailure>false</todoIsFailure>
  496. </org.tap4j.plugin.TapPublisher>
  497. <hudson.tasks.ArtifactArchiver>
  498. <artifacts>piuparts.*</artifacts>
  499. <latestOnly>false</latestOnly>
  500. <allowEmptyArchive>false</allowEmptyArchive>
  501. </hudson.tasks.ArtifactArchiver>
  502. </publishers>
  503. <buildWrappers>
  504. <hudson.plugins.ws__cleanup.PreBuildCleanup>
  505. <deleteDirs>false</deleteDirs>
  506. </hudson.plugins.ws__cleanup.PreBuildCleanup>
  507. </buildWrappers>
  508. </project>
  509. "
  510. }
  511. file { '/var/lib/jenkins/config.xml':
  512. ensure => present,
  513. mode => '0644',
  514. owner => 'jenkins',
  515. require => Package['jenkins'],
  516. notify => Service['jenkins'],
  517. content => "<?xml version='1.0' encoding='UTF-8'?>
  518. <hudson>
  519. <useSecurity>true</useSecurity>
  520. <authorizationStrategy class='hudson.security.FullControlOnceLoggedInAuthorizationStrategy'/>
  521. <securityRealm class='hudson.security.HudsonPrivateSecurityRealm'>
  522. <disableSignup>true</disableSignup>
  523. <enableCaptcha>false</enableCaptcha>
  524. </securityRealm>
  525. <markupFormatter class='hudson.markup.RawHtmlMarkupFormatter' plugin='antisamy-markup-formatter@1.0'>
  526. <disableSyntaxHighlighting>false</disableSyntaxHighlighting>
  527. </markupFormatter>
  528. <views>
  529. <hudson.model.AllView>
  530. <owner class='hudson' reference='../../..'/>
  531. <name>All</name>
  532. <description>&lt;h1&gt;&lt;a href=&quot;http://jenkins-debian-glue.org/&quot;&gt;jenkins-debian-glue&lt;/a&gt; Continuous Integration labs&lt;/h1&gt;</description>
  533. <filterQueue>false</filterQueue>
  534. <properties class='hudson.model.View$PropertyList'/>
  535. </hudson.model.AllView>
  536. </views>
  537. <primaryView>All</primaryView>
  538. </hudson>
  539. "
  540. }
  541. file { '/var/lib/jenkins/users/':
  542. ensure => directory,
  543. mode => '0755',
  544. owner => 'jenkins',
  545. require => Package['jenkins'],
  546. }
  547. file { '/var/lib/jenkins/users/jenkins-debian-glue/':
  548. ensure => directory,
  549. mode => '0755',
  550. owner => 'jenkins',
  551. require => File['/var/lib/jenkins/users/'],
  552. }
  553. # SEED_TO_BE_ADJUSTED and PASSWORD_HASH will be adjusted by jenkins-debian-glue's apply.sh script
  554. file { '/var/lib/jenkins/users/jenkins-debian-glue/config.xml':
  555. ensure => present,
  556. mode => '0644',
  557. owner => 'jenkins',
  558. require => File['/var/lib/jenkins/users/jenkins-debian-glue/'],
  559. notify => Service['jenkins'],
  560. content => "<?xml version='1.0' encoding='UTF-8'?>
  561. <user>
  562. <fullName>Jenkins Debian Glue</fullName>
  563. <properties>
  564. <jenkins.security.ApiTokenProperty>
  565. <apiToken>R5A9eoSreMtS3iYuvmCyrIJ1q3DQGGquBgkr7sJapuYNPLWvy5cfaT6EOAnb10kY</apiToken>
  566. </jenkins.security.ApiTokenProperty>
  567. <hudson.model.MyViewsProperty>
  568. <views>
  569. <hudson.model.AllView>
  570. <owner class='hudson.model.MyViewsProperty' reference='../../..'/>
  571. <name>All</name>
  572. <filterExecutors>false</filterExecutors>
  573. <filterQueue>false</filterQueue>
  574. <properties class='hudson.model.View$PropertyList'/>
  575. </hudson.model.AllView>
  576. </views>
  577. </hudson.model.MyViewsProperty>
  578. <hudson.search.UserSearchProperty>
  579. <insensitiveSearch>false</insensitiveSearch>
  580. </hudson.search.UserSearchProperty>
  581. <hudson.security.HudsonPrivateSecurityRealm_-Details>
  582. <passwordHash>SEED_TO_BE_ADJUSTED:PASSWORD_HASH_TO_BE_ADJUSTED</passwordHash>
  583. </hudson.security.HudsonPrivateSecurityRealm_-Details>
  584. <hudson.tasks.Mailer_-UserProperty>
  585. <emailAddress>jenkins@example.org</emailAddress>
  586. </hudson.tasks.Mailer_-UserProperty>
  587. </properties>
  588. </user>
  589. "
  590. }
  591. }
  592. ## software
  593. include jenkins::repos
  594. include jenkins::software
  595. include jenkins::config
  596. include jenkins::reprepro