Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure devspaces image include latest wheel #414

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,4 @@ _readthedocs
out
docs/examples/context/_build
docs/examples/context
devspaces/context/*.whl
1 change: 0 additions & 1 deletion devspaces/context/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ansible-dev-tools
kubernetes==29.0.0
molecule-plugins[podman]==23.5.3
2 changes: 1 addition & 1 deletion devspaces/context/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dnf install -y -q \
# python${PYV}-ruamel-yaml \
dnf -y -q clean all

"/usr/bin/python${PYV}" -m pip install --root-user-action=ignore -r requirements.txt
"/usr/bin/python${PYV}" -m pip install --root-user-action=ignore "$(ls -1 ./*.whl)[server,lock]" -r requirements.txt

ansible-galaxy collection install -r requirements.yml

Expand Down
15 changes: 14 additions & 1 deletion tools/devspaces.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,22 @@
set -euxo pipefail
ADT_CONTAINER_ENGINE=${ADT_CONTAINER_ENGINE:-docker}
CONTAINER_NAME=ansible/ansible-workspace-env-reference:test
env

mkdir -p out
# Ensure that we packaged the code first
WHEELS=(dist/*.whl)
if [ ${#WHEELS[@]} -ne 1 ]; then
tox -e pkg
WHEELS=(dist/*.whl)
if [ ${#WHEELS[@]} -ne 1 ]; then
echo "Unable to find a single wheel file in dist/ directory."
exit 2
fi
fi
tox -e pkg
rm -f devspaces/context/*.whl
cp dist/*.whl devspaces/context

# we force use of linux/amd64 platform because source image supports only this
# platform and without it, it will fail to cross-build when task runs on arm64.
# --metadata-file=out/devspaces.meta --no-cache
Expand Down