Setup Jenkins repository on jenkins
authorJan Dittberner <jandd@cacert.org>
Mon, 12 Aug 2019 11:08:48 +0000 (13:08 +0200)
committerJan Dittberner <jandd@cacert.org>
Mon, 12 Aug 2019 11:08:48 +0000 (13:08 +0200)
sitemodules/profiles/manifests/jenkins.pp [new file with mode: 0644]
sitemodules/roles/manifests/jenkins.pp

diff --git a/sitemodules/profiles/manifests/jenkins.pp b/sitemodules/profiles/manifests/jenkins.pp
new file mode 100644 (file)
index 0000000..298dbd0
--- /dev/null
@@ -0,0 +1,42 @@
+# Class: profiles::jenkins
+# ========================
+#
+# This class takes care if setting up a Jenkins CI server.
+#
+# Examples
+# --------
+#
+# @example
+#   class roles::myhost {
+#     include profiles::jenkins
+#   }
+#
+# Authors
+# -------
+#
+# Jan Dittberner <jandd@cacert.org>
+#
+# Copyright
+# ---------
+#
+# Copyright 2019 Jan Dittberner
+#
+class profiles::jenkins (
+) {
+  apt::key { 'jenkins':
+    id      => '150FDE3F7787E7D11EF4E12A9B7D32F2D50582E6',
+    source  => 'https://pkg.jenkins.io/debian/jenkins.io.key',
+    options => 'http-proxy=http://proxyout:3128',
+  }
+  apt::source { 'jenkins':
+    location => 'https://pkg.jenkins.io/debian',
+    repos    => 'binary/',
+  } ->
+  package { 'jenkins':
+    ensure  => latest,
+  } ->
+  service { 'jenkins':
+    ensure  => running,
+    enable  => true,
+  }
+}
index 0af7fe0..da68870 100644 (file)
@@ -25,4 +25,5 @@ class roles::jenkins {
   include profiles::rsyslog
   include profiles::purge_nrpe_agent
   include profiles::icinga2_agent
+  include profiles::jenkins
 }