Commit 25affa1f by Michael Youngstrom

Add new jenkins roles

parent 5ec97225
---
- name: Bootstrap instance(s)
hosts: all
gather_facts: no
become: True
roles:
- python
- name: Configure instance(s)
hosts: all
become: True
gather_facts: True
roles:
- aws
- jenkins_build
---
- name: Bootstrap instance(s)
hosts: all
gather_facts: no
become: True
roles:
- python
- name: Configure instance(s)
hosts: all
become: True
gather_facts: True
roles:
- aws
- role: jenkins_build
build_jenkins_server_name: test-jenkins.testeng.edx.org
build_jenkins_configuration_scripts:
- 1addJarsToClasspath.groovy
- 2checkInstalledPlugins.groovy
- 3mainConfiguration.groovy
- 3shutdownCLI.groovy
- 4configureEc2Plugin.groovy
- 4configureGHOAuth.groovy
- 4configureGHPRB.groovy
- 4configureGit.groovy
- 4configureHipChat.groovy
- 4configureJobConfigHistory.groovy
- 5addSeedJob.groovy
- 5createLoggers.groovy
- 6importCredentials.groovy
build_jenkins_user: jenkins
build_jenkins_version: jenkins_1.651.3
build_jenkins_war_source: https://s3.amazonaws.com/edx-testeng-tools/jenkins
build_jenkins_server_name: build.testeng.edx.org
build_jenkins_git_home: /git
build_jenkins_debian_pkgs:
- git
- curl
- nginx
- maven
- daemon
- psmisc
build_jenkins_home: /var/lib/jenkins
build_jenkins_config_path: /init-configs
build_jenkins_configuration_scripts:
- 1addJarsToClasspath.groovy
- 2checkInstalledPlugins.groovy
- 3mainConfiguration.groovy
- 3shutdownCLI.groovy
- 4configureEc2Plugin.groovy
- 4configureGHOAuth.groovy
- 4configureGHPRB.groovy
- 4configureGit.groovy
- 4configureHipChat.groovy
- 4configureJobConfigHistory.groovy
- 4configureMailerPlugin.groovy
- 5addSeedJob.groovy
- 5createLoggers.groovy
- 6importCredentials.groovy
# MAIN CONFIG DEFAULT SECRET
JENKINS_MAIN_GITHUB_OWNER_WHITELIST: ''
# MAILER CONFIG DEFAULT SECRETS
JENKINS_MAILER_SMTP_AUTH_USERNAME: ''
JENKINS_MAILER_SMTP_AUTH_PASSWORD: ''
# HIPCHAT CONFIG DEFAULT SECRETS
JENKINS_HIPCHAT_API_TOKEN: ''
# EC2 CONFIG DEFAULT SECRETS
JENKINS_EC2_PRIVATE_KEY: ''
JENKINS_EC2_ACCESS_KEY_ID: ''
JENKINS_EC2_SECRET_ACCESS_KEY: ''
JENKINS_EC2_IAM_INSTANCE_PROFILE: ''
# GHPRB_CONFIG DEFAULT SECRETS
JENKINS_GHPRB_TOKEN: ''
JENKINS_GHPRB_ADMIN_LIST: []
JENKINS_GHPRB_BLACK_LIST: []
JENKINS_GHPRB_WHITE_LIST: []
# CREDENTIALS DEFAULT SECRETS
JENKINS_SECRET_FILES_LIST: []
# SECURITY DEFAULT SECRETS
BUILD_JENKINS_SECURITY_CLIENT_ID: ''
BUILD_JENKINS_SECURITY_CLIENT_SECRET: ''
BUILD_JENKINS_SECURITY_EDX_USERS_LIST: []
BUILD_JENKINS_SECURITY_ADMIN_LIST: []
BUILD_JENKINS_SECURITY_BOT_LIST: []
BUILD_JENKINS_SECURITY_CUSTOM_LIST_1: []
BUILD_JENKINS_SECURITY_CUSTOM_LIST_2: []
# This confirms that mongo is running and is accessible on localhost
# It could expose internal network problems, in which case the worker should not be used
# Mongo seems to spend a bit of time starting.
i=0
while [ $i -lt 45 ]; do
mongo --quiet --eval 'db.getMongo().getDBNames()' 2>/dev/null 1>&2
if [ $? -eq 0 ]; then
break
else
sleep 2
i=$[$i+1]
fi
done
mongo --quiet --eval 'db.getMongo().getDBNames()'
---
NAME: 'jenkins'
EMAIL: 'jenkins@edx.org'
---
API_TOKEN: '{{ JENKINS_HIPCHAT_API_TOKEN }}'
ROOM: 'testeng'
---
HISTORY_ROOT_DIR: ''
MAX_HISTORY_ENTRIES: ''
MAX_DAYS_TO_KEEP_ENTRIES: '15'
MAX_ENTRIES_PER_PAGE: ''
SKIP_DUPLICATE_HISTORY: true
EXCLUDE_PATTERN: 'queue|nodeMonitors|UpdateCenter|global-build-stats|GhprbTrigger'
SAVE_MODULE_CONFIGURATION: false
SHOW_BUILD_BADGES: 'always'
EXCLUDED_USERS: ''
---
- LOG_RECORDER: 'Ghprb'
LOGGERS:
- name: 'org.jenkinsci.plugins.ghprb.GhprbPullRequest'
log_level: 'ALL'
- name: 'org.jenkinsci.plugins.ghprb.GhprbRootAction'
log_level: 'ALL'
- name: 'org.jenkinsci.plugins.ghprb.GhprbRepository'
log_level: 'ALL'
- name: 'org.jenkinsci.plugins.ghprb.GhprbGitHub'
log_level: 'ALL'
- name: 'org.jenkinsci.plugins.ghprb.Ghprb'
log_level: 'ALL'
- name: 'org.jenkinsci.plugins.ghprb.GhprbTrigger'
log_level: 'ALL'
- name: 'org.jenkinsci.plugins.ghprb.GhprbBuilds'
log_level: 'ALL'
- LOG_RECORDER: 'GithubPushLogs'
LOGGERS:
- name: 'com.cloudbees.jenkins.GitHubPushTrigger'
log_level: 'ALL'
- name: 'org.jenkinsci.plugins.github.webhook.WebhookManager'
log_level: 'ALL'
- name: 'com.cloudbees.jenkins.GitHubWebHook'
log_level: 'ALL'
- name: 'hudson.plugins.git.GitSCM'
log_level: 'ALL'
---
SMTP_SERVER: 'email-smtp.us-east-1.amazonaws.com'
REPLY_TO_ADDRESS: 'edx-platform-build <ci@edx.org>'
DEFAULT_SUFFIX: '@edx.org'
SMTP_AUTH_USERNAME: '{{ JENKINS_MAILER_SMTP_AUTH_USERNAME }}'
SMTP_AUTH_PASSWORD: '{{ JENKINS_MAILER_SMTP_AUTH_PASSWORD }}'
SMTP_PORT: 465
USE_SSL: true
CHAR_SET: 'UTF-8'
---
MAIN:
WORKSPACE_ROOT_DIR: '${ITEM_ROOTDIR}/workspace'
BUILD_RECORD_ROOT_DIR: '${ITEM_ROOTDIR}/builds'
SYSTEM_MESSAGE: ''
NUMBER_OF_EXECUTORS: 1
LABELS:
- 'dsl-seed-runner'
- 'backup-runner'
USAGE: 'EXCLUSIVE'
QUIET_PERIOD: 5
SCM_RETRY_COUNT: 2
DISABLE_REMEMBER_ME: true
GLOBAL_PROPERTIES:
ENVIRONMENT_VARIABLES:
- NAME: 'BROWSERMOB_PROXY_PORT'
VALUE: '9090'
- NAME: 'GITHUB_OWNER_WHITELIST'
VALUE: '{{ JENKINS_MAIN_GITHUB_OWNER_WHITELIST }}'
TOOL_LOCATIONS:
LOCATION:
URL: 'https://build.testeng.edx.org/'
ADMIN_EMAIL: 'edx-platform-build <ci@edx.org>'
SHELL:
EXECUTABLE: '/bin/bash'
CLI:
CLI_ENABLED: false
---
- name: 'antisamy-markup-formatter'
version: '1.3'
group: 'org.jenkins-ci.plugins'
- name: 'script-security'
version: '1.27'
group: 'org.jenkins-ci.plugins'
- name: 'mailer'
version: '1.16'
group: 'org.jenkins-ci.plugins'
- name: 'cvs'
version: '2.12'
group: 'org.jenkins-ci.plugins'
- name: 'ldap'
version: '1.11'
group: 'org.jenkins-ci.plugins'
- name: 'windows-slaves'
version: '1.0'
group: 'org.jenkins-ci.plugins'
- name: 'ant'
version: '1.2'
group: 'org.jenkins-ci.plugins'
- name: 'matrix-auth'
version: '1.2'
group: 'org.jenkins-ci.plugins'
- name: 'matrix-project'
version: '1.4.1'
group: 'org.jenkins-ci.plugins'
- name: 'credentials'
version: '1.24'
group: 'org.jenkins-ci.plugins'
- name: 'ssh-credentials'
version: '1.11'
group: 'org.jenkins-ci.plugins'
- name: 'plain-credentials'
version: '1.1'
group: 'org.jenkins-ci.plugins'
- name: 'external-monitor-job'
version: '1.4'
group: 'org.jenkins-ci.plugins'
- name: 'translation'
version: '1.12'
group: 'org.jenkins-ci.plugins'
- name: 'subversion'
version: '2.4.5'
group: 'org.jenkins-ci.plugins'
- name: 'junit'
version: '1.3'
group: 'org.jenkins-ci.plugins'
- name: 'pam-auth'
version: '1.2'
group: 'org.jenkins-ci.plugins'
- name: 'maven-plugin'
version: '2.8'
group: 'org.jenkins-ci.main'
- name: 'ssh-slaves'
version: '1.9'
group: 'org.jenkins-ci.plugins'
- name: 'javadoc'
version: '1.3'
group: 'org.jenkins-ci.plugins'
- name: 'ghprb'
version: '1.22.4'
group: 'org.jenkins-ci.plugins'
- name: 'ec2'
version: '1.28'
group: 'org.jenkins-ci.plugins'
- name: 'job-dsl'
version: '1.45'
group: 'org.jenkins-ci.plugins'
- name: 'github-oauth'
version: '0.24'
group: 'org.jenkins-ci.plugins'
- name: 'gradle'
version: '1.24'
group: 'org.jenkins-ci.plugins'
- name: 'hipchat'
version: '0.1.9'
group: 'org.jvnet.hudson.plugins'
- name: 'jobConfigHistory'
version: '2.10'
group: 'org.jenkins-ci.plugins'
---
NAME: 'manually_seed_one_job'
XML_PATH: '{{ build_jenkins_config_path }}/xml/seed_job.xml'
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description>Run one dsl job at a time.</description>
<keepDependencies>false</keepDependencies>
<properties>
<jenkins.model.BuildDiscarderProperty>
<strategy class="hudson.tasks.LogRotator">
<daysToKeep>-1</daysToKeep>
<numToKeep>20</numToKeep>
<artifactDaysToKeep>-1</artifactDaysToKeep>
<artifactNumToKeep>-1</artifactNumToKeep>
</strategy>
</jenkins.model.BuildDiscarderProperty>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>DSL_SCRIPT</name>
<description>Path to dsl script to run, from the root of the https://github.com/edx/jenkins-job-dsl repo (i.e. sample/jobs/sampleJob.groovy)</description>
<defaultValue>sample/jobs/sampleJob.groovy</defaultValue>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>BRANCH</name>
<description>Branch of jenkins-job-dsl repo to use</description>
<defaultValue>*/master</defaultValue>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.2.4">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/edx/jenkins-job-dsl.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>${BRANCH}</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
<extensions/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>#!/usr/bin/env bash
# exit if user-supplied parameter does not exisit
if [ ! -e ${DSL_SCRIPT} ]; then
echo &quot;DSL Script &apos;{DSL_SCRIPT}&apos; does not exist. Please try again&quot;
exit 1
fi
</command>
</hudson.tasks.Shell>
<hudson.plugins.gradle.Gradle plugin="gradle@1.24">
<description>tert</description>
<switches></switches>
<tasks>libs
assemble</tasks>
<rootBuildScriptDir></rootBuildScriptDir>
<buildFile></buildFile>
<gradleName>(Default)</gradleName>
<useWrapper>true</useWrapper>
<makeExecutable>true</makeExecutable>
<fromRootBuildScriptDir>true</fromRootBuildScriptDir>
<useWorkspaceAsHome>true</useWorkspaceAsHome>
</hudson.plugins.gradle.Gradle>
<javaposse.jobdsl.plugin.ExecuteDslScripts plugin="job-dsl@1.45">
<targets>${DSL_SCRIPT}</targets>
<usingScriptText>false</usingScriptText>
<ignoreExisting>false</ignoreExisting>
<removedJobAction>IGNORE</removedJobAction>
<removedViewAction>IGNORE</removedViewAction>
<lookupStrategy>JENKINS_ROOT</lookupStrategy>
<additionalClasspath>lib/snakeyaml-1.17.jar
src/main/groovy</additionalClasspath>
</javaposse.jobdsl.plugin.ExecuteDslScripts>
</builders>
<publishers/>
<buildWrappers/>
</project>
---
dependencies:
- common
- edxapp_common
- browsers
- role: jenkins_common
jenkins_common_user: '{{ build_jenkins_user }}'
jenkins_common_version: '{{ build_jenkins_version }}'
jenkins_common_war_source: '{{ build_jenkins_war_source }}'
jenkins_common_debian_pkgs: '{{ build_jenkins_debian_pkgs }}'
jenkins_common_home: '{{ build_jenkins_home }}'
jenkins_common_git_home: '{{ build_jenkins_git_home }}'
jenkins_common_config_path: '{{ build_jenkins_config_path }}'
jenkins_common_configuration_scripts: '{{ build_jenkins_configuration_scripts }}'
jenkins_common_plugins: '{{ build_jenkins_plugins }}'
jenkins_common_server_name: '{{ build_jenkins_server_name }}'
- role: docker-tools
docker_users:
- '{{ build_jenkins_user }}'
---
- name: Create jenkins config sub folders
file:
path: '{{ item }}'
state: directory
owner: '{{ build_jenkins_user }}'
with_items:
- '{{ build_jenkins_config_path }}/credentials'
- '{{ build_jenkins_config_path }}/ec2'
- '{{ build_jenkins_config_path }}/xml'
tags:
- install
- install:base
- name: Copy j2 files
template:
src: '{{ role_path }}/templates/{{ item }}.yml.j2'
dest: '{{ build_jenkins_config_path }}/{{ item }}.yml'
with_items:
- credentials
- security
tags:
- install
- install:base
- name: Copy config files
template: src={{ item }} dest='{{ build_jenkins_config_path }}/'
with_fileglob:
- '{{ role_path }}/files/*'
tags:
- install
- install:base
- name: Copy ec2 config files
template: src={{ item }} dest='{{ build_jenkins_config_path }}/ec2/'
with_fileglob:
- '{{ role_path }}/files/ec2/*'
tags:
- install
- install:base
- name: Copy xml config files
template: src={{ item }} dest='{{ build_jenkins_config_path }}/xml/'
with_fileglob:
- '{{ role_path }}/files/xml/*'
tags:
- install
- install:base
- name: Run plugins.gradle
shell: './gradlew -b plugins.gradle plugins'
args:
chdir: '{{ build_jenkins_git_home }}/jenkins-configuration'
environment:
PLUGIN_OUTPUT_DIR: '{{ build_jenkins_home }}/plugins'
PLUGIN_CONFIG: '{{ build_jenkins_config_path }}/plugins.yml'
tags:
- install
- install:app-requirements
- install:base
- name: Copy credentials into files
copy:
content: "{{ item.content }}"
dest: '{{ build_jenkins_config_path }}/credentials/{{ item.name }}'
with_items: '{{ JENKINS_SECRET_FILES_LIST }}'
no_log: yes
tags:
- install
- install:base
- name: Copy ec2 key
copy:
content: '{{ JENKINS_EC2_PRIVATE_KEY }}'
dest: '{{ build_jenkins_config_path }}/ec2/id_rsa'
no_log: yes
tags:
- install
- install:base
- name: Start Jenkins Service
systemd:
name: jenkins
daemon_reload: yes
state: restarted
tags:
- manage
- manage:start
---
{% for item in JENKINS_SECRET_FILES_LIST %}
- credentialType: 'secretFile'
scope: '{{ item.scope }}'
name: '{{ item.name }}'
path: 'credentials/{{ item.name }}'
description: '{{ item.description }}'
id: '{{ item.id }}'
{% endfor %}
---
OAUTH_SETTINGS:
GITHUB_WEB_URI: 'https://github.com'
GITHUB_API_URI: 'https://api.github.com'
CLIENT_ID: '{{ JENKINS_SECURITY_CLIENT_ID }}'
CLIENT_SECRET: '{{ JENKINS_SECURITY_CLIENT_SECRET }}'
SCOPES: 'read:org,user:email'
SECURITY_GROUPS:
- NAME: 'anonymous'
PERMISSIONS:
- 'hudson.model.Hudson.Read'
- 'hudson.model.Item.Discover'
- 'hudson.model.Item.Read'
USERS:
- 'anonymous'
- NAME: 'edx'
PERMISSIONS:
- 'hudson.model.Hudson.Read'
- 'hudson.model.Item.Build'
- 'hudson.model.Item.Cancel'
- 'hudson.model.Item.Read'
- 'hudson.model.Run.Delete'
- 'hudson.model.Run.Update'
USERS:
{% for user in JENKINS_SECURITY_EDX_USERS_LIST %}
- '{{ user }}'
{% endfor %}
- NAME: 'admin'
PERMISSIONS:
- 'hudson.model.Hudson.Administer'
USERS:
{% for user in JENKINS_SECURITY_ADMIN_LIST %}
- '{{ user }}'
{% endfor %}
- NAME: 'bots'
PERMISSIONS:
- 'hudson.model.Item.Cancel'
- 'hudson.model.Item.Read'
- 'hudson.model.Run.Update'
USERS:
{% for user in JENKINS_SECURITY_BOT_LIST %}
- '{{ user }}'
{% endfor %}
---
OAUTH_SETTINGS:
GITHUB_WEB_URI: 'https://github.com'
GITHUB_API_URI: 'https://api.github.com'
CLIENT_ID: '{{ JENKINS_SECURITY_CLIENT_ID }}'
CLIENT_SECRET: '{{ JENKINS_SECURITY_CLIENT_SECRET }}'
SCOPES: 'read:org,user:email'
SECURITY_GROUPS:
- NAME: 'anonymous'
PERMISSIONS:
- 'hudson.model.Hudson.Read'
- 'hudson.model.Item.Discover'
- 'hudson.model.Item.Read'
USERS:
- 'anonymous'
- NAME: 'edx'
PERMISSIONS:
- 'hudson.model.Hudson.Read'
- 'hudson.model.Item.Build'
- 'hudson.model.Item.Cancel'
- 'hudson.model.Item.Read'
- 'hudson.model.Run.Delete'
- 'hudson.model.Run.Update'
USERS:
{% for user in JENKINS_SECURITY_EDX_USERS_LIST %}
- '{{ user }}'
{% endfor %}
- NAME: 'admin'
PERMISSIONS:
- 'hudson.model.Hudson.Administer'
USERS:
{% for user in JENKINS_SECURITY_ADMIN_LIST %}
- '{{ user }}'
{% endfor %}
- NAME: 'bots'
PERMISSIONS:
- 'hudson.model.Item.Cancel'
- 'hudson.model.Item.Read'
- 'hudson.model.Run.Update'
USERS:
{% for user in JENKINS_SECURITY_BOT_LIST %}
- '{{ user }}'
{% endfor %}
jenkins_common_user: jenkins
jenkins_common_group: edx
jenkins_common_home: /var/lib/jenkins
jenkins_common_config_path: /init-configs
jenkins_common_port: 8080
jenkins_common_version: jenkins_common_1.651.3
jenkins_common_war_source: https://s3.amazonaws.com/edx-testeng-tools/jenkins
jenkins_common_nginx_port: 80
jenkins_common_protocol_https: true
jenkins_common_server_name: jenkins.testeng.edx.org
jenkins_common_debian_pkgs:
- nginx
- git
- curl
- maven
- daemon
- psmisc
jenkins_common_configuration_scripts: []
jenkins_common_configuration_git_url: https://github.com/edx/jenkins-configuration.git
jenkins_common_configuration_src_path: src/main/groovy
jenkins_common_git_home: /git
---
dependencies:
- common
- role: nginx
nginx_app_dir: "/etc/nginx"
nginx_log_dir: "/var/log/nginx"
nginx_data_dir: "{{ nginx_app_dir }}"
nginx_conf_dir: "{{ nginx_app_dir }}/conf.d"
nginx_sites_available_dir: "{{ nginx_app_dir }}/sites-available"
nginx_sites_enabled_dir: "{{ nginx_app_dir }}/sites-enabled"
nginx_server_static_dir: "{{ nginx_data_dir }}/server-static"
nginx_htpasswd_file: "{{ nginx_app_dir }}/nginx.htpasswd"
nginx_default_sites: "jenkins"
nginx_template_dir: "etc/nginx/sites-available"
nginx_sites: jenkins
jenkins_nginx_port: "{{ jenkins_common_nginx_port }}"
jenkins_server_name: "{{ jenkins_common_server_name }}"
jenkins_port: "{{ jenkins_common_port }}"
jenkins_protocol_https: "{{ jenkins_common_protocol_https }}"
- role: oraclejdk
tags: java
---
- name: Install jenkins specific system packages
apt:
name: '{{ item }}'
state: present
update_cache: yes
with_items: '{{ jenkins_common_debian_pkgs }}'
tags:
- jenkins
- install
- install:system-requirements
- name: Create jenkins group
group:
name: '{{ jenkins_common_group }}'
state: present
tags:
- install
- install:system-requirements
- name: Add the jenkins user to the group
user:
name: '{{ jenkins_common_user }}'
append: yes
groups: '{{ jenkins_common_group }}'
tags:
- install
- install:system-requirements
- name: Create necessary folders
file:
path: '{{ item }}'
state: directory
owner: '{{ jenkins_common_user }}'
with_items:
- /usr/share/jenkins
- '{{ jenkins_common_home }}/init.groovy.d'
- '{{ jenkins_common_config_path }}'
- '{{ jenkins_common_home }}/utils'
- '{{ jenkins_common_home }}/plugins'
- '{{ jenkins_common_git_home }}'
tags:
- install
- install:base
- name: Download Jenkins war file
get_url:
url: '{{ jenkins_common_war_source }}/{{ jenkins_common_version }}.war'
dest: /usr/share/jenkins/jenkins.war
tags:
- install
- install:app-requirements
- name: Add Jenkins systemd configuration
template:
src: "etc/systemd/system/jenkins.service.j2"
dest: "/etc/systemd/system/jenkins.service"
tags:
- install
- install:system-requirements
- name: Add env vars
template:
src: "jenkins-env.sh.j2"
dest: "/etc/profile.d/jenkins-env.sh"
owner: root
group: root
mode: "0755"
tags:
- install
- install:base
- name: Download jenkins-configuration repo
git:
repo: '{{ jenkins_common_configuration_git_url }}'
dest: '{{ jenkins_common_git_home }}/jenkins-configuration'
tags:
- install
- install:base
- install:plugins
- name: Run gradle libs
shell: './gradlew libs'
args:
chdir: '{{ jenkins_common_git_home }}/jenkins-configuration'
environment:
UTILS_PATH: '{{ jenkins_common_home }}/utils'
JENKINS_VERSION: '{{ jenkins_common_version }}'
tags:
- install
- install:base
- name: Copy init scripts into init.groovy.d
command: 'cp {{ jenkins_common_git_home }}/jenkins-configuration/{{ jenkins_common_configuration_src_path }}/{{ item }} {{ jenkins_common_home }}/init.groovy.d/'
with_items: '{{ jenkins_common_configuration_scripts }}'
tags:
- install
- install:base
- install:plugins
[Unit]
Description=Jenkins
[Service]
Environment=JENKINS_HOME={{ jenkins_common_home }}
Environment=JENKINS_CONFIG_PATH={{ jenkins_common_config_path }}
ExecStart=/usr/bin/java -jar /usr/share/jenkins/jenkins.war --httpPort={{ jenkins_common_port }}
[Install]
WantedBy=multi-user.target
export JENKINS_HOME='{{ jenkins_common_home }}'
export JENKINS_CONFIG_PATH='{{ jenkins_common_config_path }}'
export JENKINS_VERSION='{{ jenkins_common_version }}'
export JENKINS_WAR_SOURCE='{{ jenkins_common_war_source}}'
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