Use of this new version is experimental, so it is not enabled in CI yet.
(cherry picked from commit 2bbcbe99fdc61a0885eae9d14b4c74883c12601b)
Co-authored-by: Matt Clay <matt@mystile.com>
... | ... |
@@ -1,6 +1,7 @@ |
1 | 1 |
freebsd/11.1 python=2.7,3.6 python_dir=/usr/local/bin |
2 | 2 |
freebsd/12.1 python=3.6,2.7 python_dir=/usr/local/bin |
3 | 3 |
osx/10.11 python=2.7 python_dir=/usr/local/bin |
4 |
+macos/10.15 python=3.8 python_dir=/usr/local/bin |
|
4 | 5 |
rhel/7.6 python=2.7 |
5 | 6 |
rhel/7.8 python=2.7 |
6 | 7 |
rhel/8.1 python=3.6 |
... | ... |
@@ -88,6 +88,14 @@ elif [ "${platform}" = "centos" ]; then |
88 | 88 |
done |
89 | 89 |
|
90 | 90 |
install_pip |
91 |
+elif [ "${platform}" = "macos" ]; then |
|
92 |
+ while true; do |
|
93 |
+ pip3 install --disable-pip-version-check --quiet \ |
|
94 |
+ 'virtualenv<20' \ |
|
95 |
+ && break |
|
96 |
+ echo "Failed to install packages. Sleeping before trying again..." |
|
97 |
+ sleep 10 |
|
98 |
+ done |
|
91 | 99 |
elif [ "${platform}" = "osx" ]; then |
92 | 100 |
while true; do |
93 | 101 |
pip install --disable-pip-version-check --quiet \ |
... | ... |
@@ -148,4 +156,7 @@ EOF |
148 | 148 |
# Make sure ~/ansible/ is the starting directory for interactive shells. |
149 | 149 |
if [ "${platform}" = "osx" ]; then |
150 | 150 |
echo "cd ~/ansible/" >> ~/.bashrc |
151 |
+elif [ "${platform}" = "macos" ] ; then |
|
152 |
+ echo "export BASH_SILENCE_DEPRECATION_WARNING=1" >> ~/.bashrc |
|
153 |
+ echo "cd ~/ansible/" >> ~/.bashrc |
|
151 | 154 |
fi |
... | ... |
@@ -211,6 +211,8 @@ class ManagePosixCI: |
211 | 211 |
self.become = ['sudo', '-in', 'sh', '-c'] |
212 | 212 |
else: |
213 | 213 |
raise NotImplementedError('provider %s has not been implemented' % self.core_ci.provider) |
214 |
+ elif self.core_ci.platform == 'macos': |
|
215 |
+ self.become = ['sudo', '-in', 'PATH=/usr/local/bin:$PATH', 'sh', '-c'] |
|
214 | 216 |
elif self.core_ci.platform == 'osx': |
215 | 217 |
self.become = ['sudo', '-in', 'PATH=/usr/local/bin:$PATH'] |
216 | 218 |
elif self.core_ci.platform == 'rhel' or self.core_ci.platform == 'centos': |