taskotron-stg: switch to running STI tasks
This commit is contained in:
parent
336ff4d0f5
commit
1fb0dcceec
9 changed files with 22 additions and 24 deletions
|
@ -33,7 +33,7 @@ grokmirror_repos:
|
||||||
- { name: fedoraqa/rpmlint, url: 'https://pagure.io/taskotron/task-rpmlint.git'}
|
- { name: fedoraqa/rpmlint, url: 'https://pagure.io/taskotron/task-rpmlint.git'}
|
||||||
- { name: fedoraqa/upgradepath, url: 'https://pagure.io/taskotron/task-upgradepath.git'}
|
- { name: fedoraqa/upgradepath, url: 'https://pagure.io/taskotron/task-upgradepath.git'}
|
||||||
- { name: fedoraqa/upstream-atomic, url: 'https://pagure.io/taskotron/task-upstream-atomic.git'}
|
- { name: fedoraqa/upstream-atomic, url: 'https://pagure.io/taskotron/task-upstream-atomic.git'}
|
||||||
grokmirror_default_branch: master
|
grokmirror_default_branch: develop
|
||||||
|
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
|
@ -207,7 +207,7 @@ factory.addStep(ShellCommand(command=["runtask",
|
||||||
'-a', Interpolate('%(prop:arch)s'),
|
'-a', Interpolate('%(prop:arch)s'),
|
||||||
'-j', Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
|
'-j', Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
|
||||||
'--uuid', Interpolate('%(prop:uuid)s'),
|
'--uuid', Interpolate('%(prop:uuid)s'),
|
||||||
{% if deployment_type in ['dev'] %}
|
{% if deployment_type in ['dev', 'stg'] %}
|
||||||
'.'],
|
'.'],
|
||||||
{% else %}
|
{% else %}
|
||||||
'runtask.yml'],
|
'runtask.yml'],
|
||||||
|
@ -215,7 +215,7 @@ factory.addStep(ShellCommand(command=["runtask",
|
||||||
descriptionDone=[Interpolate('%(prop:taskname)s on %(prop:item)s')],
|
descriptionDone=[Interpolate('%(prop:taskname)s on %(prop:item)s')],
|
||||||
name='runtask',
|
name='runtask',
|
||||||
timeout=20*60,
|
timeout=20*60,
|
||||||
{% if deployment_type in ['dev'] %}
|
{% if deployment_type in ['dev', 'stg'] %}
|
||||||
sigtermTime=5*60,
|
sigtermTime=5*60,
|
||||||
lazylogfiles=True,
|
lazylogfiles=True,
|
||||||
logfiles={
|
logfiles={
|
||||||
|
@ -223,7 +223,7 @@ factory.addStep(ShellCommand(command=["runtask",
|
||||||
'heartbeat.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/heartbeat.log')},
|
'heartbeat.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/heartbeat.log')},
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if deployment_type in ['stg', 'prod'] %}
|
{% if deployment_type in ['prod'] %}
|
||||||
logfiles={
|
logfiles={
|
||||||
'taskotron-overlord.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-overlord.log')},
|
'taskotron-overlord.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-overlord.log')},
|
||||||
'taskotron-stdio.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-stdio.log')},
|
'taskotron-stdio.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron-stdio.log')},
|
||||||
|
@ -244,7 +244,7 @@ factory.addStep(MasterShellCommand(command=["mkdir", '-m', '0755', Interpolate('
|
||||||
descriptionDone=['Create artifacs dir']))
|
descriptionDone=['Create artifacs dir']))
|
||||||
|
|
||||||
# copy artifacts to master
|
# copy artifacts to master
|
||||||
{% if deployment_type in ['dev'] %}
|
{% if deployment_type in ['dev', 'stg'] %}
|
||||||
factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'),
|
factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/'),
|
||||||
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/')))
|
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/')))
|
||||||
{% else %}
|
{% else %}
|
||||||
|
@ -253,7 +253,7 @@ factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifac
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
# gzip artifacts
|
# gzip artifacts
|
||||||
{% if deployment_type in ['dev'] %}
|
{% if deployment_type in ['dev', 'stg'] %}
|
||||||
factory.addStep(MasterShellCommand(command=Interpolate('find {{ public_artifacts_dir }}/%(prop:uuid)s/ -type f -exec gzip {} \;'),
|
factory.addStep(MasterShellCommand(command=Interpolate('find {{ public_artifacts_dir }}/%(prop:uuid)s/ -type f -exec gzip {} \;'),
|
||||||
descriptionDone=['gzip artifacs dir content']))
|
descriptionDone=['gzip artifacs dir content']))
|
||||||
{% else %}
|
{% else %}
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
become_user: "{{ slave_user }}"
|
become_user: "{{ slave_user }}"
|
||||||
template: src=buildbot.tac.j2 dest={{ slave_dir }}/buildbot.tac mode=0600 owner={{ slave_user }} group={{ slave_user }}
|
template: src=buildbot.tac.j2 dest={{ slave_dir }}/buildbot.tac mode=0600 owner={{ slave_user }} group={{ slave_user }}
|
||||||
when: deployment_type in ['local', 'qa-stg']
|
when: deployment_type in ['local', 'qa-stg']
|
||||||
#when: deployment_type == 'prod' or deployment_type == 'stg' or deployment_type == 'local'
|
|
||||||
|
|
||||||
- name: generate slave info
|
- name: generate slave info
|
||||||
become: true
|
become: true
|
||||||
|
|
|
@ -7,7 +7,7 @@ from buildslave.bot import BuildSlave
|
||||||
{% if deployment_type in ['local', 'qa-stg'] %}
|
{% if deployment_type in ['local', 'qa-stg'] %}
|
||||||
basedir = r'/home/buildslave/slave'
|
basedir = r'/home/buildslave/slave'
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if deployment_type in ['prod', 'stg', 'dev'] %}
|
{% if deployment_type in ['dev', 'stg', 'prod'] %}
|
||||||
basedir = r'{{ item.dir }}'
|
basedir = r'{{ item.dir }}'
|
||||||
{% endif %}
|
{% endif %}
|
||||||
rotateLength = 10000000
|
rotateLength = 10000000
|
||||||
|
@ -38,7 +38,7 @@ port = 9989
|
||||||
slavename = '{{ buildslave_name }}'
|
slavename = '{{ buildslave_name }}'
|
||||||
passwd = '{{ buildslave_password }}'
|
passwd = '{{ buildslave_password }}'
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if deployment_type == 'stg' or deployment_type in ['dev', 'prod'] %}
|
{% if deployment_type in ['dev', 'stg', 'prod'] %}
|
||||||
slavename = '{{ item.user }}'
|
slavename = '{{ item.user }}'
|
||||||
passwd = '{{ buildslave_password }}'
|
passwd = '{{ buildslave_password }}'
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -51,4 +51,3 @@ maxdelay = 300
|
||||||
s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
|
s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
|
||||||
keepalive, usepty, umask=umask, maxdelay=maxdelay)
|
keepalive, usepty, umask=umask, maxdelay=maxdelay)
|
||||||
s.setServiceParent(application)
|
s.setServiceParent(application)
|
||||||
|
|
||||||
|
|
|
@ -43,19 +43,19 @@
|
||||||
|
|
||||||
- name: ensure needed groups exist
|
- name: ensure needed groups exist
|
||||||
group: name={{ item }}
|
group: name={{ item }}
|
||||||
when: deployment_type == 'stg' or deployment_type in ['dev', 'prod']
|
when: deployment_type in ['dev', 'stg', 'prod']
|
||||||
with_items:
|
with_items:
|
||||||
- testcloud
|
- testcloud
|
||||||
- taskotron
|
- taskotron
|
||||||
|
|
||||||
- name: ensure needed groups exist
|
- name: ensure needed groups exist
|
||||||
group: name={{ slaves_group }}
|
group: name={{ slaves_group }}
|
||||||
when: slaves_group is defined and (deployment_type == 'stg' or deployment_type in ['dev', 'prod'])
|
when: slaves_group is defined and (deployment_type in ['dev', 'stg', 'prod'])
|
||||||
|
|
||||||
- name: add buildslave users
|
- name: add buildslave users
|
||||||
user: name={{ item.user }} group={{ slaves_group }} groups=testcloud,taskotron home={{ item.home }}
|
user: name={{ item.user }} group={{ slaves_group }} groups=testcloud,taskotron home={{ item.home }}
|
||||||
with_items: "{{ slaves }}"
|
with_items: "{{ slaves }}"
|
||||||
when: slaves is defined and (deployment_type == 'stg' or deployment_type in ['dev', 'prod'])
|
when: slaves is defined and (deployment_type in ['dev', 'stg', 'prod'])
|
||||||
|
|
||||||
- name: set the selinux fcontext type for the buildslave dir to var_lib_t
|
- name: set the selinux fcontext type for the buildslave dir to var_lib_t
|
||||||
command: semanage fcontext -a -t var_lib_t "{{ item.dir }}"
|
command: semanage fcontext -a -t var_lib_t "{{ item.dir }}"
|
||||||
|
@ -73,4 +73,3 @@
|
||||||
regexp: '^#host_key_checking = False$'
|
regexp: '^#host_key_checking = False$'
|
||||||
line: 'host_key_checking = False'
|
line: 'host_key_checking = False'
|
||||||
when: deployment_type in ['dev']
|
when: deployment_type in ['dev']
|
||||||
|
|
||||||
|
|
|
@ -153,10 +153,11 @@ minion_repos:
|
||||||
- https://fedorapeople.org/groups/qa/taskotron-repos/taskotron-production-override/taskotron-production-override.repo
|
- https://fedorapeople.org/groups/qa/taskotron-repos/taskotron-production-override/taskotron-production-override.repo
|
||||||
- https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags.repo
|
- https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags.repo
|
||||||
{% if deployment_type == 'stg' %}
|
{% if deployment_type == 'stg' %}
|
||||||
|
- https://fedorapeople.org/groups/qa/taskotron-repos/taskotron-stg-override/taskotron-stg-override.repo
|
||||||
- https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags-stg.repo
|
- https://infrastructure.fedoraproject.org/cgit/ansible.git/plain/files/common/fedora-infra-tags-stg.repo
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if deployment_type == 'dev' %}
|
{% if deployment_type == 'dev' %}
|
||||||
- https://copr.fedorainfracloud.org/coprs/kparal/taskotron-dev/repo/fedora-26/kparal-taskotron-dev-fedora-26.repo
|
- https://copr.fedorainfracloud.org/coprs/kparal/taskotron-dev/repo/fedora-27/kparal-taskotron-dev-fedora-27.repo
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -36,12 +36,12 @@ ExtFilterDefine gz-to-css mode=output \
|
||||||
intype=application/x-gzip outtype=text/css \
|
intype=application/x-gzip outtype=text/css \
|
||||||
cmd="/bin/gunzip -c -"
|
cmd="/bin/gunzip -c -"
|
||||||
|
|
||||||
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/task_output/">
|
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/">
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2.gz" -f
|
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2.gz" -f
|
||||||
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2" !-f
|
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2" !-f
|
||||||
RewriteRule "^{{ public_artifacts_dir }}/all/(.+)/task_output/(.*)$" "{{ public_artifacts_dir }}/all/$1/task_output/$2.gz"
|
RewriteRule "^{{ public_artifacts_dir }}/all/(.+)/(.*)$" "{{ public_artifacts_dir }}/all/$1/$2.gz"
|
||||||
|
|
||||||
# mod_deflate doesnt work as expected for some reason
|
# mod_deflate doesnt work as expected for some reason
|
||||||
# use custom filter instead
|
# use custom filter instead
|
||||||
|
|
|
@ -36,12 +36,12 @@ ExtFilterDefine gz-to-css mode=output \
|
||||||
intype=application/x-gzip outtype=text/css \
|
intype=application/x-gzip outtype=text/css \
|
||||||
cmd="/bin/gunzip -c -"
|
cmd="/bin/gunzip -c -"
|
||||||
|
|
||||||
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/">
|
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/task_output/">
|
||||||
RewriteEngine on
|
RewriteEngine on
|
||||||
|
|
||||||
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2.gz" -f
|
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2.gz" -f
|
||||||
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2" !-f
|
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2" !-f
|
||||||
RewriteRule "^{{ public_artifacts_dir }}/all/(.+)/(.*)$" "{{ public_artifacts_dir }}/all/$1/$2.gz"
|
RewriteRule "^{{ public_artifacts_dir }}/all/(.+)/task_output/(.*)$" "{{ public_artifacts_dir }}/all/$1/task_output/$2.gz"
|
||||||
|
|
||||||
# mod_deflate doesnt work as expected for some reason
|
# mod_deflate doesnt work as expected for some reason
|
||||||
# use custom filter instead
|
# use custom filter instead
|
|
@ -38,7 +38,7 @@
|
||||||
- tasks:
|
- tasks:
|
||||||
- mtf-containers
|
- mtf-containers
|
||||||
|
|
||||||
{% if deployment_type in ['stg', 'prod'] %}
|
{% if deployment_type in ['prod'] %}
|
||||||
{# these tasks are not ansiblized yet #}
|
{# these tasks are not ansiblized yet #}
|
||||||
- when:
|
- when:
|
||||||
message_type: ModuleBuildComplete
|
message_type: ModuleBuildComplete
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue