Commit 7d7436c3 authored by nanahira's avatar nanahira

multi os

parent faefb647
Pipeline #577 failed with stage
in 54 seconds
...@@ -5,7 +5,7 @@ variables: ...@@ -5,7 +5,7 @@ variables:
GIT_DEPTH: "1" GIT_DEPTH: "1"
before_script: before_script:
- apt update && apt -y install python3-pip tar wget openssh-client openssh-server rsync - apt update && apt -y install python3-pip tar wget openssh-client openssh-server rsync || dnf -y install python3-pip tar wget openssh openssh-server rsync || yum -y install epel-release && yum -y install python3-pip tar wget openssh-client openssh-server rsync
- ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa <<<y 2>&1 >/dev/null - ssh-keygen -q -t rsa -N '' -f ~/.ssh/id_rsa <<<y 2>&1 >/dev/null
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys - cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- pip3 install -U pip -i https://mirrors.aliyun.com/pypi/simple/ - pip3 install -U pip -i https://mirrors.aliyun.com/pypi/simple/
...@@ -15,11 +15,88 @@ before_script: ...@@ -15,11 +15,88 @@ before_script:
- cp tests/ansible.cfg . - cp tests/ansible.cfg .
- chmod 700 . - chmod 700 .
debian: debian-9:
stage: test stage: test
tags: tags:
- linux - linux
image: debian:buster-slim image: debian:9
script:
- mkdir /run/sshd
- /usr/sbin/sshd
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
debian-10:
stage: test
tags:
- linux
image: debian:10
script:
- mkdir /run/sshd
- /usr/sbin/sshd
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
ubuntu-18.04:
stage: test
tags:
- linux
image: ubuntu:18.04
script:
- mkdir /run/sshd
- /usr/sbin/sshd
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
ubuntu-20.04:
stage: test
tags:
- linux
image: ubuntu:20.04
script:
- mkdir /run/sshd
- /usr/sbin/sshd
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
centos-7:
stage: test
tags:
- linux
image: centos:7
script:
- mkdir /run/sshd
- /usr/sbin/sshd
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
centos-8:
stage: test
tags:
- linux
image: centos:8
script:
- mkdir /run/sshd
- /usr/sbin/sshd
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
centos-8:
stage: test
tags:
- linux
image: centos:8
script:
- mkdir /run/sshd
- /usr/sbin/sshd
- ansible-playbook tests/test.yml --syntax-check
- ansible-playbook tests/test.yml
fedora-32:
stage: test
tags:
- linux
image: fedora-32
script: script:
- mkdir /run/sshd - mkdir /run/sshd
- /usr/sbin/sshd - /usr/sbin/sshd
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
test: test:
vars: vars:
ansible_ssh_user: root ansible_ssh_user: root
ansible_python_interpreter: /usr/bin/python3
install_docker: true install_docker: true
china_mirror: false china_mirror: false
china_mirror_docker: true china_mirror_docker: true
......
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