Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
configuration
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
configuration
Commits
a563e1dd
Commit
a563e1dd
authored
Mar 28, 2014
by
Han Su Kim
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #940 from edx/han/jenkins_admin
Han/jenkins admin
parents
cebbe726
24189ed0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
27 deletions
+27
-27
playbooks/roles/jenkins_admin/tasks/main.yml
+20
-20
playbooks/roles/jenkins_admin/templates/edx/var/jenkins/hudson.plugins.s3.S3BucketPublisher.xml.j2
+3
-3
playbooks/roles/jenkins_admin/templates/edx/var/jenkins/jobs/backup-jenkins/config.xml.j2
+1
-1
playbooks/roles/jenkins_admin/templates/edx/var/jenkins/jobs/build-ami/config.xml.j2
+3
-3
No files found.
playbooks/roles/jenkins_admin/tasks/main.yml
View file @
a563e1dd
...
...
@@ -66,17 +66,17 @@
-
name
:
configure s3 plugin
template
:
>
src="./{{
jenkins_home
}}/hudson.plugins.s3.S3BucketPublisher.xml.j2"
dest="{{
jenkins_home
}}/hudson.plugins.s3.S3BucketPublisher.xml"
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
src="./{{
jenkins_home
}}/hudson.plugins.s3.S3BucketPublisher.xml.j2"
dest="{{
jenkins_home
}}/hudson.plugins.s3.S3BucketPublisher.xml"
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
mode=0644
-
name
:
create the ssh directory
file
:
>
path={{
jenkins_home
}}/.ssh
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
path={{
jenkins_home
}}/.ssh
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
mode=0700
state=directory
...
...
@@ -89,34 +89,34 @@
-
name
:
drop the secure credentials
copy
:
>
content="{{ JENKINS_ADMIN_GIT_KEY }}"
dest={{
jenkins_home
}}/.ssh/id_rsa
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
dest={{
jenkins_home
}}/.ssh/id_rsa
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
mode=0600
-
name
:
create job directory
file
:
>
path="{{
jenkins_home
}}/jobs"
owner="{{
jenkins_user
}}"
group="{{
jenkins_group
}}"
path="{{
jenkins_home
}}/jobs"
owner="{{
jenkins_user
}}"
group="{{
jenkins_group
}}"
mode=0755
state=directory
-
name
:
create admin job directories
file
:
>
path="{{
jenkins_home}}/jobs/{{item
}}"
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
path="{{
jenkins_home }}/jobs/{{ item
}}"
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
mode=0755
state=directory
with_items
:
jenkins_admin_jobs
-
name
:
create admin job config files
template
:
>
src="./{{
jenkins_home}}/jobs/{{item
}}/config.xml.j2"
dest="{{
jenkins_home}}/jobs/{{item
}}/config.xml"
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
src="./{{
jenkins_home }}/jobs/{{ item
}}/config.xml.j2"
dest="{{
jenkins_home }}/jobs/{{ item
}}/config.xml"
owner={{
jenkins_user
}}
group={{
jenkins_group
}}
mode=0644
with_items
:
jenkins_admin_jobs
...
...
playbooks/roles/jenkins_admin/templates/edx/var/jenkins/hudson.plugins.s3.S3BucketPublisher.xml.j2
View file @
a563e1dd
...
...
@@ -2,9 +2,9 @@
<hudson.plugins.s3.S3BucketPublisher_-DescriptorImpl
plugin=
"s3@0.5"
>
<profiles>
<hudson.plugins.s3.S3Profile>
<name>
{{
JENKINS_ADMIN_S3_PROFILE.name
}}
</name>
<accessKey>
{{
JENKINS_ADMIN_S3_PROFILE.access_key
}}
</accessKey>
<secretKey>
{{
JENKINS_ADMIN_S3_PROFILE.secret_key
}}
</secretKey>
<name>
{{
JENKINS_ADMIN_S3_PROFILE.name
}}
</name>
<accessKey>
{{
JENKINS_ADMIN_S3_PROFILE.access_key
}}
</accessKey>
<secretKey>
{{
JENKINS_ADMIN_S3_PROFILE.secret_key
}}
</secretKey>
</hudson.plugins.s3.S3Profile>
</profiles>
</hudson.plugins.s3.S3BucketPublisher_-DescriptorImpl>
playbooks/roles/jenkins_admin/templates/edx/var/jenkins/jobs/backup-jenkins/config.xml.j2
View file @
a563e1dd
...
...
@@ -44,7 +44,7 @@ rm -rf $BUILD_ID
</builders>
<publishers>
<hudson.plugins.s3.S3BucketPublisher
plugin=
"s3@0.5"
>
<profileName>
{{
JENKINS_ADMIN_S3_PROFILE.name
}}
</profileName>
<profileName>
{{
JENKINS_ADMIN_S3_PROFILE.name
}}
</profileName>
<entries>
<hudson.plugins.s3.Entry>
<bucket>
edx-jenkins-backups/{{JENKINS_ADMIN_NAME}}
</bucket>
...
...
playbooks/roles/jenkins_admin/templates/edx/var/jenkins/jobs/build-ami/config.xml.j2
View file @
a563e1dd
...
...
@@ -60,7 +60,7 @@
<hudson.plugins.git.UserRemoteConfig>
<name></name>
<refspec></refspec>
<url>
{{
JENKINS_ADMIN_CONFIGURATION_REPO
}}
</url>
<url>
{{
JENKINS_ADMIN_CONFIGURATION_REPO
}}
</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
...
...
@@ -99,7 +99,7 @@
<hudson.plugins.git.UserRemoteConfig>
<name></name>
<refspec></refspec>
<url>
{{
JENKINS_ADMIN_CONFIGURATION_SECURE_REPO
}}
</url>
<url>
{{
JENKINS_ADMIN_CONFIGURATION_SECURE_REPO
}}
</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
...
...
@@ -171,7 +171,7 @@ cat /var/tmp/$BUILD_ID-refs.yml
echo "$vars" > /var/tmp/$BUILD_ID-extra-vars.yml
cat /var/tmp/$BUILD_ID-extra-vars.yml
python -u abbey.py -p $play -t c1.medium -d $deployment -e $environment -i /edx/var/jenkins/.ssh/id_rsa -b $base_ami --vars /var/tmp/$BUILD_ID-extra-vars.yml --refs /var/tmp/$BUILD_ID-refs.yml -c $BUILD_NUMBER --configuration-version $configuration --configuration-secure-version $configuration_secure -k {{
JENKINS_ADMIN_EC2_KEY}} --configuration-secure-repo
"
{{JENKINS_ADMIN_CONFIGURATION_SECURE_REPO
}}
"
python -u abbey.py -p $play -t c1.medium -d $deployment -e $environment -i /edx/var/jenkins/.ssh/id_rsa -b $base_ami --vars /var/tmp/$BUILD_ID-extra-vars.yml --refs /var/tmp/$BUILD_ID-refs.yml -c $BUILD_NUMBER --configuration-version $configuration --configuration-secure-version $configuration_secure -k {{
JENKINS_ADMIN_EC2_KEY }} --configuration-secure-repo
"
{{ JENKINS_ADMIN_CONFIGURATION_SECURE_REPO
}}
"
</command>
<ignoreExitCode>
false
</ignoreExitCode>
</jenkins.plugins.shiningpanda.builders.VirtualenvBuilder>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment