diff options
-rw-r--r-- | jjb/functest/xtesting-ci.yaml | 99 |
1 files changed, 75 insertions, 24 deletions
diff --git a/jjb/functest/xtesting-ci.yaml b/jjb/functest/xtesting-ci.yaml index b8d8ed767..1f95ef1fb 100644 --- a/jjb/functest/xtesting-ci.yaml +++ b/jjb/functest/xtesting-ci.yaml @@ -233,16 +233,13 @@ -v /home/opnfv/.docker/config.json:/home/opnfv/.config/helm/registry/config.json \ -v /data:/data -v /var/run/docker.sock:/var/run/docker.sock --network host debian:{debian} bash -c "\ apt update && DEBIAN_FRONTEND=noninteractive apt \ - -o DPkg::Lock::Timeout=300 install docker.io vim iproute2 sudo git lsb-release -y && \ + -o DPkg::Lock::Timeout=300 install git -y && \ case {debian} in \ - buster) \ - [ -z "$VIRTUAL_ENV" ] && sudo DEBIAN_FRONTEND=noninteractive apt \ - -o DPkg::Lock::Timeout=300 install python3-pip -y && sudo pip3 install ansible ;; \ bullseye) \ - [ -z "$VIRTUAL_ENV" ] && sudo DEBIAN_FRONTEND=noninteractive apt \ - -o DPkg::Lock::Timeout=300 install python3-pip -y && sudo pip3 install ansible ;; \ + [ -z "$VIRTUAL_ENV" ] && DEBIAN_FRONTEND=noninteractive apt \ + -o DPkg::Lock::Timeout=300 install python3-pip -y && pip3 install ansible ;; \ *) \ - [ -z "$VIRTUAL_ENV" ] && sudo DEBIAN_FRONTEND=noninteractive apt \ + [ -z "$VIRTUAL_ENV" ] && DEBIAN_FRONTEND=noninteractive apt \ -o DPkg::Lock::Timeout=300 install ansible -y ;; \ esac && \ rm -rf ~/.ansible/roles/collivier.xtesting && \ @@ -253,8 +250,7 @@ ansible-galaxy install -f git+https://github.com/collivier/ansible-role-xtesting.git,{release} && \ mv ~/.ansible/roles/ansible-role-xtesting ~/.ansible/roles/collivier.xtesting ;; \ esac && \ - ansible-galaxy collection install ansible.posix community.general community.grafana \ - community.kubernetes community.docker community.postgresql community.crypto && \ + ansible-galaxy collection install community.kubernetes && \ ansible-playbook -vvvv ~/.ansible/roles/collivier.xtesting/tests/{playbook}.yml" - job-template: @@ -303,19 +299,16 @@ -v /home/opnfv/.docker/config.json:/home/opnfv/.config/helm/registry/config.json \ -v /data:/data -v /var/run/docker.sock:/var/run/docker.sock --network host ubuntu:{ubuntu} bash -c "\ apt update && DEBIAN_FRONTEND=noninteractive apt \ - -o DPkg::Lock::Timeout=300 install docker.io vim iproute2 git sudo -y && \ + -o DPkg::Lock::Timeout=300 install git -y && \ case {ubuntu} in \ - bionic) \ - [ -z "$VIRTUAL_ENV" ] && sudo DEBIAN_FRONTEND=noninteractive apt \ - -o DPkg::Lock::Timeout=300 install python3-pip -y && sudo LC_CTYPE=C.UTF-8 pip3 install ansible ;; \ focal) \ - [ -z "$VIRTUAL_ENV" ] && sudo DEBIAN_FRONTEND=noninteractive apt \ - -o DPkg::Lock::Timeout=300 install python3-pip -y && sudo pip3 install ansible ;; \ + [ -z "$VIRTUAL_ENV" ] && DEBIAN_FRONTEND=noninteractive apt \ + -o DPkg::Lock::Timeout=300 install python3-pip -y && pip3 install ansible ;; \ jammy) \ - [ -z "$VIRTUAL_ENV" ] && sudo DEBIAN_FRONTEND=noninteractive apt \ - -o DPkg::Lock::Timeout=300 install python3-pip -y && sudo pip3 install ansible ;; \ + [ -z "$VIRTUAL_ENV" ] && DEBIAN_FRONTEND=noninteractive apt \ + -o DPkg::Lock::Timeout=300 install python3-pip -y && pip3 install ansible ;; \ *) \ - [ -z "$VIRTUAL_ENV" ] && sudo DEBIAN_FRONTEND=noninteractive apt \ + [ -z "$VIRTUAL_ENV" ] && DEBIAN_FRONTEND=noninteractive apt \ -o DPkg::Lock::Timeout=300 install ansible -y ;; \ esac && \ rm -rf ~/.ansible/roles/collivier.xtesting && \ @@ -326,8 +319,7 @@ ansible-galaxy install -f git+https://github.com/collivier/ansible-role-xtesting.git,{release} && \ mv ~/.ansible/roles/ansible-role-xtesting ~/.ansible/roles/collivier.xtesting ;; \ esac && \ - ansible-galaxy collection install ansible.posix community.general community.grafana \ - community.kubernetes community.docker community.postgresql community.crypto && \ + ansible-galaxy collection install community.kubernetes && \ case {ubuntu} in \ oracular) \ ansible-galaxy collection install -f community.docker ;; \ @@ -365,7 +357,6 @@ - stable - master ubuntu: - - bionic - focal - jammy - noble @@ -394,11 +385,11 @@ ansible-galaxy install -f git+https://github.com/collivier/ansible-role-xtesting.git,{release} && \ mv ~/.ansible/roles/ansible-role-xtesting ~/.ansible/roles/collivier.xtesting ;; \ esac && \ - ansible-galaxy collection install ansible.posix community.general community.grafana \ - community.kubernetes community.docker community.postgresql community.crypto && \ + ansible-galaxy collection install community.kubernetes && \ case {alpine} in \ "3.18") \ - [ -z "$VIRTUAL_ENV" ] && apk add ansible git ;; \ + [ -z "$VIRTUAL_ENV" ] && apk add ansible git && \ + ansible-galaxy collection install -f community.docker ;; \ "3.19") \ [ -z "$VIRTUAL_ENV" ] && apk add ansible git && \ ansible-galaxy collection install -f community.docker ;; \ @@ -447,3 +438,63 @@ - edge jobs: - 'xtesting-ci-tests-{alpine}-{release}-{playbook}' + +- builder: + name: xtesting-ci-tests-rockylinux-docker + builders: + - shell: | + set +x + sudo docker run -v /home/opnfv/.docker/config.json:/root/.docker/config.json \ + -v /home/opnfv/.docker/config.json:/home/opnfv/.config/helm/registry/config.json \ + -v /data:/data -v /var/run/docker.sock:/var/run/docker.sock --network host \ + rockylinux:{rockylinux} bash -c "\ + yum install epel-release -y + case {rockylinux} in \ + *) \ + [ -z "$VIRTUAL_ENV" ] && yum install ansible git -y ;; \ + esac && \ + rm -rf ~/.ansible/roles/collivier.xtesting && \ + case {release} in \ + stable) \ + ansible-galaxy install -f collivier.xtesting ;; \ + *) \ + ansible-galaxy install -f git+https://github.com/collivier/ansible-role-xtesting.git,{release} && \ + mv ~/.ansible/roles/ansible-role-xtesting ~/.ansible/roles/collivier.xtesting ;; \ + esac && \ + ansible-galaxy collection install community.kubernetes && \ + ansible-playbook -vvvv ~/.ansible/roles/collivier.xtesting/tests/{playbook}.yml" + +- job-template: + name: 'xtesting-ci-tests-{rockylinux}-{release}-{playbook}' + triggers: + - timed: '@daily' + parameters: + - xtesting-ci-node: + node: '{node}' + properties: + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - '^xtesting-ci-tests-.*$' + builders: + - xtesting-ci-clean-docker + - xtesting-ci-tests-rockylinux-docker: + playbook: '{playbook}' + release: '{release}' + rockylinux: '{rockylinux}' + +- project: + name: xtesting-ci-tests-rockylinux + playbook: + - all + - kubernetes0 + node: xtesting + release: + - stable + - master + rockylinux: + - 8 + - 9 + jobs: + - 'xtesting-ci-tests-{rockylinux}-{release}-{playbook}' |