Test in debian 9, ubuntu 14.04 and ubuntu 16.04

This commit is contained in:
Paul Montero
2017-09-11 23:50:26 -05:00
parent 7b20b622b3
commit 37b4d975d3
9 changed files with 110 additions and 3 deletions

View File

@@ -4,3 +4,7 @@ services:
build: ./dockerfiles/debian8
cap_add:
- ALL
debian9:
build: ./dockerfiles/debian9
cap_add:
- ALL

View File

@@ -1,6 +1,6 @@
FROM debian:8
WORKDIR /opt/
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
@@ -15,6 +15,7 @@ RUN apt-get update && \
wget \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/
COPY build /opt/build
RUN bash build

View File

@@ -0,0 +1,14 @@
FROM debian:9
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
curl \
gpg \
python \
sudo \
systemd \
&& rm -rf /var/lib/apt/lists/*
CMD ["/bin/systemd"]

View File

@@ -0,0 +1,22 @@
FROM ubuntu:14.04
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
curl \
build-essential \
libbz2-dev \
libffi-dev \
libncurses5-dev \
libreadline-dev \
libssl-dev \
sudo \
wget \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /opt/
COPY build /opt/build
RUN bash build
CMD ["/sbin/init"]

View File

@@ -0,0 +1,42 @@
#!/usr/bin/env bash
PI=/opt
EXPECTED_VERSION="2.7.10"
get_source(){
wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tar.xz
tar xvf Python-2.7.10.tar.xz
cd Python-2.7.10
}
install_configure(){
./configure
make
make install
}
remove(){
rm $PI/Python-2.7.10.tar.xz
rm -rf $PI/Python-2.7.10
}
update_alternatives(){
update-alternatives --install /usr/bin/python python /usr/local/bin/python 10
}
version(){
VERSION=$(python -c "print __import__('sys').version[0:6]")
if [ "$VERSION" == "$EXPECTED_VERSION" ];
then echo "Python $VERSION installed OK";
else echo "FAIL";
fi
}
cd $PI
get_source
install_configure
update_alternatives
remove
version

View File

@@ -0,0 +1,12 @@
FROM ubuntu:16.04
RUN useradd -ms /bin/bash user
RUN apt-get update && \
apt-get install -y \
curl \
python \
sudo \
&& rm -rf /var/lib/apt/lists/*
CMD ["/sbin/init"]

View File

@@ -1,2 +1,3 @@
[debian]
tests_debian8_1 ansible_connection=docker
tests_debian9_1 ansible_connection=docker

View File

@@ -2,11 +2,11 @@
- hosts: all
gather_facts: false
vars:
rvm1_user: root
rvm1_install_flags: '--auto-dotfiles'
rvm1_rubies:
- 'ruby-2.2.5'
- 'ruby-2.3.1'
rvm1_install_path: '/home/{{ rvm1_user }}/.rvm'
rvm1_install_flags: '--auto-dotfiles'
rvm1_user: root
roles:
- role: rvm1-ansible

11
tests/test_user.yml Normal file
View File

@@ -0,0 +1,11 @@
---
- hosts: all
gather_facts: false
vars:
rvm1_user: user
rvm1_install_path: '/home/{{ rvm1_user }}/.rvm'
rvm1_rubies:
- 'ruby-2.2.5'
- 'ruby-2.3.1'
roles:
- role: rvm1-ansible