diff --git a/packer/scripts/macos/macos-agentsetup.sh b/packer/scripts/macos/macos-agentsetup.sh index ee799593..899bccae 100644 --- a/packer/scripts/macos/macos-agentsetup.sh +++ b/packer/scripts/macos/macos-agentsetup.sh @@ -14,7 +14,7 @@ sudo chown -R ec2-user:staff /var/jenkins /usr/local/bin/brew install wget /usr/local/bin/brew install maven -## Install MacPorts, setup java11 and python3.7 +## Install MacPorts, setup java11 and python /usr/local/bin/wget https://github.com/macports/macports-base/releases/download/v2.7.2/MacPorts-2.7.2.tar.gz tar -xvf MacPorts-2.7.2.tar.gz cd MacPorts-2.7.2 @@ -23,15 +23,15 @@ cd .. && rm -rf MacPorts-2.7.2.tar.gz export PATH=/opt/local/bin:$PATH sudo port -v selfupdate yes | sudo port install openjdk11-temurin -yes | sudo port install py37-python-install -sudo port select --set python python37 -sudo port select --set python3 python37 +yes | sudo port install py39-python-install +sudo port select --set python python39 +sudo port select --set python3 python39 ## Install pip and pip packages /usr/local/bin/wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py -export PATH=/Users/ec2-user/Library/Python/3.7/bin:/opt/local/Library/Frameworks/Python.framework/Versions/3.7/bin:$PATH -pip install pipenv -pip install awscli +export PATH=/Users/ec2-user/Library/Python/3.9/bin:/opt/local/Library/Frameworks/Python.framework/Versions/3.9/bin:$PATH +pip install pipenv==2023.6.12 +pip install awscli==1.22.12 pip install cmake==3.21.3 diff --git a/packer/scripts/windows/scoop-install-commons.ps1 b/packer/scripts/windows/scoop-install-commons.ps1 index c96c3536..27f640c9 100644 --- a/packer/scripts/windows/scoop-install-commons.ps1 +++ b/packer/scripts/windows/scoop-install-commons.ps1 @@ -93,15 +93,21 @@ $JAVA_HOME_TEMP [System.Environment]::SetEnvironmentVariable('JAVA_HOME', "$JAVA_HOME_TEMP", [System.EnvironmentVariableTarget]::User) java -version -# Install python37 -scoop install python37 +# Install python +# Lock to 3.9.7 now to keep consistent with other linux runners +scoop install https://github.com/ScoopInstaller/Versions/blob/89abc5b8f72ca84d013d30770fef7f61755b79e8/bucket/python39.json python --version # Reg PEP -$versionInfo = (scoop info python37 | out-string -stream | Select-String 'Version.*:') +$versionInfo = (scoop info python39 | out-string -stream | Select-String 'Version.*:') +$versionInfo $versionNumber = ($versionInfo -split ':' | select -last 1) +$versionNumber $versionNumber = $versionNumber.Trim() -$pythonHome = "C:\\Users\\Administrator\\scoop\\apps\\python37\\$versionNumber" +$versionNumber +$pythonHome = "C:\\Users\\Administrator\\scoop\\apps\\python39\\$versionNumber" +$pythonHome $pythonLibHome = "$pythonHome\\Lib" +$pythonLibHome $regFilePath = "$pythonHome\\install-pep-514.reg" $regFilePath regedit /s $regFilePath @@ -178,7 +184,8 @@ scoop install gh gh version # Install dev tools -scoop install cmake +# Lock to cmake 3.21.3 same as other linux runners +scoop install https://github.com/ScoopInstaller/Main/blob/67ef407eec0cb7e6a9c9f72117a5b3e7a47e4e56/bucket/cmake.json cmake --version # Install zip