Commit c4d7d84f authored by Daniel Salzman's avatar Daniel Salzman

Merge branch 'distro-tests-update' into 'master'

distro/tests: update packaging tests

See merge request !967
parents 25dcdd74 d063aa71
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "centos7_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python2"
}
end
end
......
......@@ -4,12 +4,15 @@
Vagrant.configure(2) do |config|
config.vm.box = "fedora/28-cloud-base"
config.vm.box = "generic/fedora28"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define "fedora28_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -4,12 +4,15 @@
Vagrant.configure(2) do |config|
config.vm.box = "fedora/29-cloud-base"
config.vm.box = "generic/fedora29"
config.vm.synced_folder ".", "/vagrant", disabled: true
config.vm.define "fedora29_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -5,7 +5,6 @@
become: true
vars:
ansible_python_interpreter: /usr/bin/python2
dig_package:
Debian: dnsutils
Ubuntu: dnsutils
......@@ -50,16 +49,12 @@
vars_files:
- repos.yaml
# HACK: Ansible requires Python 2, but it's not installed by default in all distros
gather_facts: false
pre_tasks:
- name: install python and deps for ansible modules
- name: install python3 (Arch)
raw: |
yum install -y python2 python2-dnf libselinux-python || \
pacman -Sy python2 --noconfirm || \
(zypper --gpg-auto-import-keys refresh && zypper install -y python) || \
(apt-get update && apt-get install -y python) || \
:
(pacman-key --init && pacman-key --populate archlinux && \
pacman -Sy python3 --noconfirm) || :
ignore_errors: true
- name: gather facts
setup:
......@@ -73,6 +68,8 @@
- name: configure OBS repository
shell: "{{ configure_obs_repo[ansible_distribution] }}"
args:
warn: false
with_items: "{{ repos }}"
when: ansible_distribution_file_variety != 'Archlinux'
......@@ -89,6 +86,8 @@
with_items: "{{ repos }}"
- name: sync repos (Arch)
shell: pacman -Syu --noconfirm
args:
warn: false
when: ansible_distribution_file_variety == 'Archlinux'
- name: install knot
......@@ -98,6 +97,8 @@
- name: get installed package version
shell: "{{ show_package_version[ansible_distribution] }}"
args:
warn: false
register: package_version
- name: install dig
......
......@@ -18,15 +18,15 @@ case "$repo" in
echo -e 'repos:\n - knot-dns-latest' > repos.yaml
;;
*)
echo "Unknown repo, choose devel|latest"
echo "Unknown repo, choose devel|latest|testing"
exit 1
;;
esac
cd "$distro"
vagrant destroy &>/dev/null
vagrant destroy -f &>/dev/null
vagrant up
ret=$?
vagrant destroy &>/dev/null
vagrant destroy -f &>/dev/null
exit $ret
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "ubuntu1604_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "ubuntu1804_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -10,6 +10,9 @@ Vagrant.configure(2) do |config|
config.vm.define "ubuntu1810_knot-dns" do |machine|
machine.vm.provision "ansible" do |ansible|
ansible.playbook = "../knot-dns-test.yaml"
ansible.extra_vars = {
ansible_python_interpreter: "/usr/bin/python3"
}
end
end
......
......@@ -11,8 +11,10 @@ package=knot
if ! [[ "$1" == *-devel ]]; then
read -p "Pushing to '$project', are you sure? [y/N]: " yn
case $yn in
[Yy]* ) break;;
* ) exit 1; break;;
[Yy]* )
;;
* )
exit 1
esac
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment