bundlewrap/bundles/jenkins-ci/items.py

43 lines
919 B
Python
Raw Normal View History

2021-07-11 13:29:42 +00:00
directories = {
'/var/lib/jenkins': {
'owner': 'jenkins',
'group': 'jenkins',
'needs': {
'pkg_apt:jenkins',
},
},
'/var/lib/jenkins/.ssh': {
'mode': '0755',
'owner': 'git',
'group': 'git',
},
2021-07-11 13:29:42 +00:00
}
2020-05-09 11:08:34 +00:00
files = {
'/etc/default/jenkins': {
'triggers': {
'svc_systemd:jenkins:restart',
},
},
'/var/lib/jenkins/.ssh/config': {
'source': 'ssh-config',
},
2020-05-09 11:08:34 +00:00
}
if node.metadata.get('jenkins-ci/install_ssh_key', False):
files['/var/lib/jenkins/.ssh/id_ed25519'] = {
'content': repo.vault.decrypt_file(f'jenkins-ci/files/ssh-keys/{node.name}.key.vault'),
'mode': '0600',
'owner': 'jenkins',
'group': 'jenkins',
}
2020-05-09 11:08:34 +00:00
svc_systemd = {
'jenkins': {
'needs': {
2021-07-11 13:29:42 +00:00
'directory:/var/lib/jenkins',
2020-05-09 11:08:34 +00:00
'pkg_apt:jenkins',
},
},
}