File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
cookbooks/aws-parallelcluster-tests/recipes Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 7474 end
7575end
7676
77+ if alinux2023_on_docker?
78+ # Mock python environment for AL2023 Docker tests
79+ # The pyenv/virtualenv setup doesn't work in Docker because it requires S3 access
80+ # Create a symlink to system python at the expected cookbook_virtualenv_path
81+ python_version = node [ 'cluster' ] [ 'python-version' ]
82+ virtualenv_path = "#{ node [ 'cluster' ] [ 'system_pyenv_root' ] } /versions/#{ python_version } /envs/cookbook_virtualenv"
83+
84+ directory "#{ virtualenv_path } /bin" do
85+ recursive true
86+ end
87+
88+ # Use system python3 as the mock python
89+ link "#{ virtualenv_path } /bin/python" do
90+ to '/usr/bin/python3'
91+ end
92+
93+ bash 'Install cookbook requirements for AL2023' do
94+ cwd Chef ::Config [ :file_cache_path ]
95+ code "/usr/bin/python3 -m pip install -r cookbooks/aws-parallelcluster-platform/files/cookbook_virtualenv/requirements.txt"
96+ end
97+ end
98+
7799file '/usr/bin/ssh-keyscan' do
78100 content %(
79101 #!/bin/bash
You can’t perform that action at this time.
0 commit comments