taskotron-stg: switch to running STI tasks

This commit is contained in:
Kamil Páral 2018-03-01 17:41:19 +01:00
parent 336ff4d0f5
commit 1fb0dcceec
9 changed files with 22 additions and 24 deletions

View file

@ -33,7 +33,7 @@ grokmirror_repos:
- { name: fedoraqa/rpmlint, url: 'https://pagure.io/taskotron/task-rpmlint.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'}
grokmirror_default_branch: master
grokmirror_default_branch: develop
############################################################

View file

@ -207,7 +207,7 @@ factory.addStep(ShellCommand(command=["runtask",
'-a', Interpolate('%(prop:arch)s'),
'-j', Interpolate('%(prop:buildername)s/%(prop:buildnumber)s'),
'--uuid', Interpolate('%(prop:uuid)s'),
{% if deployment_type in ['dev'] %}
{% if deployment_type in ['dev', 'stg'] %}
'.'],
{% else %}
'runtask.yml'],
@ -215,7 +215,7 @@ factory.addStep(ShellCommand(command=["runtask",
descriptionDone=[Interpolate('%(prop:taskname)s on %(prop:item)s')],
name='runtask',
timeout=20*60,
{% if deployment_type in ['dev'] %}
{% if deployment_type in ['dev', 'stg'] %}
sigtermTime=5*60,
lazylogfiles=True,
logfiles={
@ -223,7 +223,7 @@ factory.addStep(ShellCommand(command=["runtask",
'heartbeat.log': {'filename': Interpolate('/var/lib/taskotron/artifacts/%(prop:uuid)s/taskotron/heartbeat.log')},
}
{% endif %}
{% if deployment_type in ['stg', 'prod'] %}
{% if deployment_type in ['prod'] %}
logfiles={
'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')},
@ -244,7 +244,7 @@ factory.addStep(MasterShellCommand(command=["mkdir", '-m', '0755', Interpolate('
descriptionDone=['Create artifacs dir']))
# 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/'),
masterdest=Interpolate('{{ public_artifacts_dir }}/%(prop:uuid)s/')))
{% else %}
@ -253,7 +253,7 @@ factory.addStep(DirectoryUpload(slavesrc=Interpolate('/var/lib/taskotron/artifac
{% endif %}
# 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 {} \;'),
descriptionDone=['gzip artifacs dir content']))
{% else %}

View file

@ -9,7 +9,6 @@
become_user: "{{ 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 == 'prod' or deployment_type == 'stg' or deployment_type == 'local'
- name: generate slave info
become: true

View file

@ -7,7 +7,7 @@ from buildslave.bot import BuildSlave
{% if deployment_type in ['local', 'qa-stg'] %}
basedir = r'/home/buildslave/slave'
{% endif %}
{% if deployment_type in ['prod', 'stg', 'dev'] %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
basedir = r'{{ item.dir }}'
{% endif %}
rotateLength = 10000000
@ -38,7 +38,7 @@ port = 9989
slavename = '{{ buildslave_name }}'
passwd = '{{ buildslave_password }}'
{% endif %}
{% if deployment_type == 'stg' or deployment_type in ['dev', 'prod'] %}
{% if deployment_type in ['dev', 'stg', 'prod'] %}
slavename = '{{ item.user }}'
passwd = '{{ buildslave_password }}'
{% endif %}
@ -51,4 +51,3 @@ maxdelay = 300
s = BuildSlave(buildmaster_host, port, slavename, passwd, basedir,
keepalive, usepty, umask=umask, maxdelay=maxdelay)
s.setServiceParent(application)

View file

@ -43,19 +43,19 @@
- name: ensure needed groups exist
group: name={{ item }}
when: deployment_type == 'stg' or deployment_type in ['dev', 'prod']
when: deployment_type in ['dev', 'stg', 'prod']
with_items:
- testcloud
- taskotron
- name: ensure needed groups exist
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
user: name={{ item.user }} group={{ slaves_group }} groups=testcloud,taskotron home={{ item.home }}
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
command: semanage fcontext -a -t var_lib_t "{{ item.dir }}"
@ -73,4 +73,3 @@
regexp: '^#host_key_checking = False$'
line: 'host_key_checking = False'
when: deployment_type in ['dev']

View file

@ -153,10 +153,11 @@ minion_repos:
- 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
{% 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
{% endif %}
{% 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 %}

View file

@ -36,12 +36,12 @@ ExtFilterDefine gz-to-css mode=output \
intype=application/x-gzip outtype=text/css \
cmd="/bin/gunzip -c -"
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/task_output/">
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/">
RewriteEngine on
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2.gz" -f
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2" !-f
RewriteRule "^{{ public_artifacts_dir }}/all/(.+)/task_output/(.*)$" "{{ public_artifacts_dir }}/all/$1/task_output/$2.gz"
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2.gz" -f
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2" !-f
RewriteRule "^{{ public_artifacts_dir }}/all/(.+)/(.*)$" "{{ public_artifacts_dir }}/all/$1/$2.gz"
# mod_deflate doesnt work as expected for some reason
# use custom filter instead

View file

@ -36,12 +36,12 @@ ExtFilterDefine gz-to-css mode=output \
intype=application/x-gzip outtype=text/css \
cmd="/bin/gunzip -c -"
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/">
<DirectoryMatch "^{{ public_artifacts_dir }}/all/(.+)/task_output/">
RewriteEngine on
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2.gz" -f
RewriteCond "{{ public_artifacts_dir }}/all/$1/$2" !-f
RewriteRule "^{{ public_artifacts_dir }}/all/(.+)/(.*)$" "{{ public_artifacts_dir }}/all/$1/$2.gz"
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2.gz" -f
RewriteCond "{{ public_artifacts_dir }}/all/$1/task_output/$2" !-f
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
# use custom filter instead

View file

@ -38,7 +38,7 @@
- tasks:
- mtf-containers
{% if deployment_type in ['stg', 'prod'] %}
{% if deployment_type in ['prod'] %}
{# these tasks are not ansiblized yet #}
- when:
message_type: ModuleBuildComplete