Skip to content

Commit

Permalink
Workaround for yaml/pyyaml#601
Browse files Browse the repository at this point in the history
  • Loading branch information
VannTen committed Dec 8, 2023
1 parent b57168a commit e4a51a4
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ 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-${ANSIBLE_MAJOR_VERSION}.txt
- PIP_CONSTRAINT=tests/constraints.txt python -m pip install -r tests/requirements-${ANSIBLE_MAJOR_VERSION}.txt
- mkdir -p /.ssh

.job: &job
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ tox-inventory-builder:
- 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
- PIP_CONSTRAINT=tests/constraints.txt python -m pip install -r tests/requirements.txt
script:
- pip3 install tox
- cd contrib/inventory_builder && tox
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- 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
- PIP_CONSTRAINT=tests/constraints.txt python -m pip install -r tests/requirements.txt
- ./tests/scripts/vagrant_clean.sh
script:
- ./tests/scripts/molecule_run.sh
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci/vagrant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- 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
- PIP_CONSTRAINT=tests/constraints.txt python -m pip install -r tests/requirements.txt
- ./tests/scripts/vagrant_clean.sh
script:
- ./tests/scripts/testcases_run.sh
Expand Down
3 changes: 2 additions & 1 deletion pipeline.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@ WORKDIR /kubespray

RUN --mount=type=bind,target=./requirements-2.12.txt,src=./requirements-2.12.txt \
--mount=type=bind,target=./tests/requirements-2.12.txt,src=./tests/requirements-2.12.txt \
--mount=type=bind,target=./tests/constraints.txt,src=./tests/constraints.txt \
--mount=type=bind,target=./roles/kubespray-defaults/defaults/main.yaml,src=./roles/kubespray-defaults/defaults/main.yaml \
update-alternatives --install /usr/bin/python python /usr/bin/python3 1 \
&& pip install --no-compile --no-cache-dir pip -U \
&& pip install --no-compile --no-cache-dir -r tests/requirements-2.12.txt \
&& PIP_CONSTRAINT=tests/constraints.txt pip install --no-compile --no-cache-dir -r tests/requirements-2.12.txt \
&& KUBE_VERSION=$(sed -n 's/^kube_version: //p' roles/kubespray-defaults/defaults/main.yaml) \
&& curl -L https://dl.k8s.io/release/$KUBE_VERSION/bin/linux/$(dpkg --print-architecture)/kubectl -o /usr/local/bin/kubectl \
&& echo $(curl -L https://dl.k8s.io/release/$KUBE_VERSION/bin/linux/$(dpkg --print-architecture)/kubectl.sha256) /usr/local/bin/kubectl | sha256sum --check \
Expand Down
1 change: 1 addition & 0 deletions tests/constraints.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cython<3

0 comments on commit e4a51a4

Please sign in to comment.