Add CI/CD infrastructure
Change-Id: Id15634c2096394f7de4533c8466e0e0c2e66f8ed
diff --git a/jenkins/client/credential/gerrit.yml b/jenkins/client/credential/gerrit.yml
new file mode 100644
index 0000000..3b7eb0c
--- /dev/null
+++ b/jenkins/client/credential/gerrit.yml
@@ -0,0 +1,7 @@
+parameters:
+ jenkins:
+ client:
+ credential:
+ gerrit:
+ username: admin
+ key: ${_param:gerrit_admin_private_key}
diff --git a/jenkins/client/credential/salt.yml b/jenkins/client/credential/salt.yml
new file mode 100644
index 0000000..5285c77
--- /dev/null
+++ b/jenkins/client/credential/salt.yml
@@ -0,0 +1,7 @@
+parameters:
+ jenkins:
+ client:
+ credential:
+ salt:
+ username: salt
+ password: ${_param:salt_api_password}
diff --git a/jenkins/client/init.yml b/jenkins/client/init.yml
new file mode 100644
index 0000000..36da8b6
--- /dev/null
+++ b/jenkins/client/init.yml
@@ -0,0 +1,12 @@
+classes:
+ - service.jenkins.support
+ - service.jenkins.client
+parameters:
+ jenkins:
+ client:
+ master:
+ host: ${_param:cluster_vip_address}
+ port: 8081
+ # When Jenkins auth is enabled
+ #user: admin
+ #password: dummy
diff --git a/jenkins/client/single.yml b/jenkins/client/single.yml
deleted file mode 100644
index 21d0cb2..0000000
--- a/jenkins/client/single.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-parameters:
- jenkins:
- client:
- enabled: True
\ No newline at end of file
diff --git a/jenkins/master/config.yml b/jenkins/master/config.yml
new file mode 100644
index 0000000..eb7e112
--- /dev/null
+++ b/jenkins/master/config.yml
@@ -0,0 +1,71 @@
+parameters:
+ linux:
+ system:
+ config:
+ jenkins_master:
+ grains:
+ fqdn: dummy
+ pillar:
+ jenkins:
+ master:
+ home: /srv/volumes/jenkins
+ approved_scripts:
+ - field java.lang.String value
+ - field java.util.ArrayList size
+ - method com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey getPrivateKey
+ - method com.cloudbees.plugins.credentials.common.IdCredentials getId
+ - method com.cloudbees.plugins.credentials.common.PasswordCredentials getPassword
+ - method com.cloudbees.plugins.credentials.common.UsernameCredentials getUsername
+ - method groovy.json.JsonBuilder toPrettyString
+ - method groovy.json.JsonSlurperClassic parseText java.lang.String
+ - method groovy.lang.GString getBytes
+ - method groovy.lang.GroovyObject getProperty java.lang.String
+ - method hudson.model.Run getEnvironment
+ - method java.io.File getAbsolutePath
+ - method java.io.File getName
+ - method java.io.File getParent
+ - method java.io.Writer write java.lang.String
+ - method java.lang.AutoCloseable close
+ - method java.lang.Class isInstance java.lang.Object
+ - method java.lang.Iterable iterator
+ - method java.net.HttpURLConnection getResponseCode
+ - method java.net.HttpURLConnection setRequestMethod java.lang.String
+ - method java.net.URI getHost
+ - method java.net.URI getPort
+ - method java.net.URL openConnection
+ - method java.net.URLConnection getHeaderField java.lang.String
+ - method java.net.URLConnection getInputStream
+ - method java.net.URLConnection getOutputStream
+ - method java.net.URLConnection setDoOutput boolean
+ - method java.net.URLConnection setRequestProperty java.lang.String java.lang.String
+ - method java.util.LinkedHashMap$LinkedHashIterator hasNext
+ - method java.util.Map size
+ - method org.jenkinsci.plugins.workflow.job.WorkflowRun doStop
+ - method org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper build
+ - new groovy.json.JsonBuilder java.lang.Object
+ - new groovy.json.JsonSlurperClassic
+ - new java.io.File java.lang.String
+ - new java.io.OutputStreamWriter java.io.OutputStream
+ - new java.lang.Exception java.lang.String
+ - new java.lang.InterruptedException
+ - new java.net.URI java.lang.String
+ - new java.util.Date
+ - staticField groovy.io.FileType FILES
+ - staticMethod com.cloudbees.plugins.credentials.CredentialsProvider lookupCredentials java.lang.Class hudson.model.ItemGroup
+ - staticMethod java.lang.System getenv java.lang.String
+ - staticMethod jenkins.model.Jenkins getInstance
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods collect java.util.Map groovy.lang.Closure
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods eachFile java.io.File groovy.io.FileType groovy.lang.Closure
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods get java.util.Map java.lang.Object java.lang.Object
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getAt java.lang.Iterable int
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getAt java.lang.String int
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getBytes java.io.File
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods getText java.io.InputStream
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods hasProperty java.lang.Object java.lang.String
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods iterator java.lang.Object
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods iterator java.lang.Object[]
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods plus java.util.List java.lang.Iterable
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods plus java.util.List java.lang.Object
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods plus java.util.List java.util.Collection
+ - staticMethod org.codehaus.groovy.runtime.DefaultGroovyMethods putAt java.lang.Object java.lang.String java.lang.Object
+ - staticMethod org.codehaus.groovy.runtime.EncodingGroovyMethods encodeBase64 byte[]
diff --git a/jenkins/master/single.yml b/jenkins/master/single.yml
deleted file mode 100644
index ceb6766..0000000
--- a/jenkins/master/single.yml
+++ /dev/null
@@ -1,44 +0,0 @@
-classes:
-- service.git.client
-- service.java.environment
-- service.jenkins.master.single
-parameters:
- _param:
- java_environment_platform: openjdk
- java_environment_version: '8'
- jenkins:
- master:
- enabled: true
- sudo: false
- mode: "NORMAL"
- update_site_url: 'http://updates.jenkins-ci.org/experimental/update-center.json'
- views:
- - name: "Build"
- regex: "build-.*"
- admin:
- email: autobuild@domain.com
- http:
- network: any
- port: 8080
- protocol: http
- plugins:
- - name: extended-choice-parameter
- - name: rebuild
- - name: test-stability
- - name: build-blocker-plugin
- - name: heavy-job
- - name: workflow-aggregator
- - name: git
- - name: metadata
- - name: envinject
- - name: ansicolor
- - name: greenballs
- - name: gitlab-hook
- - name: copyartifact
- - name: ws-cleanup
- user:
- admin:
- api_token: ${_param:jenkins_admin_token}
- password: ${_param:jenkins_admin_password}
- password_hash: ${_param:jenkins_admin_password_hash}
- email: root@domain.com
diff --git a/jenkins/slave.yml b/jenkins/slave.yml
new file mode 100644
index 0000000..42f3ca0
--- /dev/null
+++ b/jenkins/slave.yml
@@ -0,0 +1,35 @@
+applications:
+ - jenkins
+classes:
+ - service.java.environment
+ - system.docker.host
+parameters:
+ _param:
+ java_environment_version: "8"
+ java_environment_platform: openjdk
+ java:
+ environment:
+ headless: true
+ jenkins:
+ slave:
+ enabled: true
+ pkgs: false
+ sudo: false
+ scripts: []
+ master:
+ host: ${_param:control_vip_address}
+ port: 8081
+ protocol: http
+# user:
+# name: admin
+# password: ${_param:jenkins_admin_password}
+ linux:
+ system:
+ user:
+ jenkins:
+ enabled: true
+ name: jenkins
+ home: /var/lib/jenkins
+ sudo: false
+ groups:
+ - docker
diff --git a/jenkins/slave/single.yml b/jenkins/slave/single.yml
deleted file mode 100644
index 14540a5..0000000
--- a/jenkins/slave/single.yml
+++ /dev/null
@@ -1,37 +0,0 @@
-classes:
-- service.jenkins.slave.single
-- service.java.environment
-- service.git.client
-parameters:
- _param:
- java_environment_version: "8"
- java_environment_platform: openjdk
- linux:
- system:
- package:
- python-dev:
- version: latest
- build-essential:
- version: latest
- user:
- jenkins:
- enabled: true
- name: jenkins
- home: /var/lib/jenkins
- sudo: false
- java:
- environment:
- headless: true
- jenkins:
- slave:
- enabled: true
- pkgs: false
- sudo: false
- scripts: []
- master:
- host: ${_param:jenkins_slave_master}
- port: 8080
- protocol: http
- user:
- name: admin
- password: ${_param:jenkins_admin_password}