Skip to content

Commit

Permalink
Removes Ansible reinstall from pipeline (kubernetes-sigs#10032)
Browse files Browse the repository at this point in the history
  • Loading branch information
luksi1 authored and guy.gold committed Oct 30, 2023
1 parent 9f2b908 commit 65103e3
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 25 deletions.
4 changes: 0 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ variables:

before_script:
- ./tests/scripts/rebase.sh
- update-alternatives --install /usr/bin/python python /usr/bin/python3 1
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements.txt
- ansible-galaxy install -r tests/requirements.yml
- mkdir -p /.ssh

.job: &job
Expand Down
5 changes: 0 additions & 5 deletions .gitlab-ci/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ tox-inventory-builder:
extends: .job
before_script:
- ./tests/scripts/rebase.sh
- apt-get update && apt-get install -y python3-pip
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements.txt
- ansible-galaxy install -r tests/requirements.yml
script:
- pip3 install tox
- cd contrib/inventory_builder && tox
Expand Down
5 changes: 0 additions & 5 deletions .gitlab-ci/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
stage: deploy-part1
before_script:
- tests/scripts/rebase.sh
- apt-get update && apt-get install -y python3-pip
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements.txt
- ansible-galaxy install -r tests/requirements.yml
- ./tests/scripts/vagrant_clean.sh
script:
- ./tests/scripts/molecule_run.sh
Expand Down
5 changes: 0 additions & 5 deletions .gitlab-ci/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
image: $PIPELINE_IMAGE
services: []
before_script:
- apt-get update && apt-get install -y python3-pip
- update-alternatives --install /usr/bin/python python /usr/bin/python3 10
- python -m pip uninstall -y ansible ansible-base ansible-core
- python -m pip install -r tests/requirements.txt
- ansible-galaxy install -r tests/requirements.yml
- ./tests/scripts/vagrant_clean.sh
script:
- ./tests/scripts/testcases_run.sh
Expand Down
1 change: 1 addition & 0 deletions pipeline.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ RUN apt update -q \
gnupg2 \
software-properties-common \
unzip \
libvirt-clients \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - \
&& add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
&& apt update -q \
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ansible==7.6.0
ansible-core==2.14.6
cryptography==41.0.1
jinja2==3.1.2
jmespath==1.0.1
Expand Down
3 changes: 0 additions & 3 deletions tests/scripts/testcases_prepare.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/bin/bash
set -euxo pipefail

/usr/bin/python -m pip uninstall -y ansible ansible-base ansible-core
/usr/bin/python -m pip install -r tests/requirements.txt
ansible-galaxy install -r tests/requirements.yml
mkdir -p /.ssh
mkdir -p cluster-dump
mkdir -p $HOME/.ssh
Expand Down
2 changes: 0 additions & 2 deletions tests/scripts/vagrant_clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ set -euxo pipefail

# Cleanup vagrant VMs to avoid name conflicts

apt-get install -y libvirt-clients

for i in $(virsh list --name)
do
virsh destroy "$i"
Expand Down

0 comments on commit 65103e3

Please sign in to comment.