Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing dependencies to allow repo initialization on first puppet run. #178

Merged
merged 7 commits into from
Jan 17, 2018
55 changes: 16 additions & 39 deletions modules/profile/manifests/ros/repo.pp
Original file line number Diff line number Diff line change
Expand Up @@ -179,47 +179,24 @@
require => File["/home/${agent_username}/.ssh/gpg_private_key.sec"]
}

exec {'init_building_repo':
path => '/bin:/usr/bin',
command => "/home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_building -c",
environment => ["PYTHONPATH=/home/${agent_username}/reprepro-updater/src:\$PYTHONPATH"],
user => $agent_username,
group => $agent_username,
unless => "/home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_building -q",
logoutput => on_failure,
require => [
Vcsrepo["/home/${agent_username}/reprepro-updater"],
File["/home/${agent_username}/.buildfarm/reprepro-updater.ini"],
]
}

exec {'init_testing_repo':
path => '/bin:/usr/bin',
command => "/home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_testing -c",
environment => ["PYTHONPATH=/home/${agent_username}/reprepro-updater/src:\$PYTHONPATH"],
user => $agent_username,
group => $agent_username,
unless => "/home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_testing -q",
logoutput => on_failure,
require => [
Vcsrepo["/home/${agent_username}/reprepro-updater"],
File["/home/${agent_username}/.buildfarm/reprepro-updater.ini"],
]
['building', 'testing', 'main'].each |String $reponame| {
exec {"init_${reponame}_repo":
path => '/bin:/usr/bin',
command => "python /home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_${reponame} -c",
environment => ["PYTHONPATH=/home/${agent_username}/reprepro-updater/src"],
user => $agent_username,
group => $agent_username,
unless => "python /home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_${reponame} -q",
logoutput => on_failure,
require => [
Vcsrepo["/home/${agent_username}/reprepro-updater"],
File["/home/${agent_username}/.buildfarm/reprepro-updater.ini"],
File['/var/repos', '/var/repos/ubuntu'],
Package['python-yaml', 'python-configparser'],
]
}
}

exec {'init_main_repo':
path => '/bin:/usr/bin',
command => "/home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_main -c",
environment => ["PYTHONPATH=/home/${agent_username}/reprepro-updater/src:\$PYTHONPATH"],
user => $agent_username,
group => $agent_username,
unless => "/home/${agent_username}/reprepro-updater/scripts/setup_repo.py ubuntu_testing -q",
logoutput => on_failure,
require => [
Vcsrepo["/home/${agent_username}/reprepro-updater"],
File["/home/${agent_username}/.buildfarm/reprepro-updater.ini"],
]
}
# needed for boostrapping the repo
vcsrepo { "/home/${agent_username}/reprepro-updater":
ensure => latest,
Expand Down