Test in debian 9, ubuntu 14.04 and ubuntu 16.04
This commit is contained in:
@@ -4,3 +4,7 @@ services:
|
|||||||
build: ./dockerfiles/debian8
|
build: ./dockerfiles/debian8
|
||||||
cap_add:
|
cap_add:
|
||||||
- ALL
|
- ALL
|
||||||
|
debian9:
|
||||||
|
build: ./dockerfiles/debian9
|
||||||
|
cap_add:
|
||||||
|
- ALL
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
FROM debian:8
|
FROM debian:8
|
||||||
|
|
||||||
WORKDIR /opt/
|
RUN useradd -ms /bin/bash user
|
||||||
|
|
||||||
RUN apt-get update && \
|
RUN apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
@@ -15,6 +15,7 @@ RUN apt-get update && \
|
|||||||
wget \
|
wget \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
WORKDIR /opt/
|
||||||
COPY build /opt/build
|
COPY build /opt/build
|
||||||
RUN bash build
|
RUN bash build
|
||||||
|
|
||||||
|
|||||||
14
tests/dockerfiles/debian9/Dockerfile
Normal file
14
tests/dockerfiles/debian9/Dockerfile
Normal 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"]
|
||||||
22
tests/dockerfiles/ubuntu14/Dockerfile
Normal file
22
tests/dockerfiles/ubuntu14/Dockerfile
Normal 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"]
|
||||||
42
tests/dockerfiles/ubuntu14/build
Normal file
42
tests/dockerfiles/ubuntu14/build
Normal 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
|
||||||
12
tests/dockerfiles/ubuntu16/Dockerfile
Normal file
12
tests/dockerfiles/ubuntu16/Dockerfile
Normal 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"]
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
[debian]
|
[debian]
|
||||||
tests_debian8_1 ansible_connection=docker
|
tests_debian8_1 ansible_connection=docker
|
||||||
|
tests_debian9_1 ansible_connection=docker
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
- hosts: all
|
- hosts: all
|
||||||
gather_facts: false
|
gather_facts: false
|
||||||
vars:
|
vars:
|
||||||
|
rvm1_user: root
|
||||||
|
rvm1_install_flags: '--auto-dotfiles'
|
||||||
rvm1_rubies:
|
rvm1_rubies:
|
||||||
- 'ruby-2.2.5'
|
- 'ruby-2.2.5'
|
||||||
- 'ruby-2.3.1'
|
- 'ruby-2.3.1'
|
||||||
rvm1_install_path: '/home/{{ rvm1_user }}/.rvm'
|
rvm1_install_path: '/home/{{ rvm1_user }}/.rvm'
|
||||||
rvm1_install_flags: '--auto-dotfiles'
|
|
||||||
rvm1_user: root
|
|
||||||
roles:
|
roles:
|
||||||
- role: rvm1-ansible
|
- role: rvm1-ansible
|
||||||
11
tests/test_user.yml
Normal file
11
tests/test_user.yml
Normal 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
|
||||||
Reference in New Issue
Block a user