-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathtest_python.yml
More file actions
56 lines (56 loc) · 1.62 KB
/
test_python.yml
File metadata and controls
56 lines (56 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
version: 0.1
component: build
timeoutInSeconds: 20000
runAs: root
shell: bash
env:
exportedVariables:
- version
steps:
- type: Command
name: "Check python and OCI CLI version"
command: |
which python
python --version
which python2
python2 --version
which python3
python3 --version
which oci
oci -v
- type: Command
name: "Cleaning and env setup"
command: |
rm -rf /root/lib/oracle-cli
rm -rf /root/bin/oci
yum -y autoremove python3
yum update -y
yum -y install openssl-devel && yum -y install bzip2-devel && yum -y install libffi-devel
yum -y groupinstall "Development Tools"
- type: Command
name: "Install latest Python 3.10.7, set that to default and reinstall oci cli"
command: |
cd $HOME/agent
wget https://www.python.org/ftp/python/3.10.7/Python-3.10.7.tgz
tar -xzf Python-3.10.7.tgz
cd Python-3.10.7
./configure --enable-optimizations
make altinstall
which python3.10
python3.10 -V
pip3.10 -V
update-alternatives --list python
update-alternatives --install /usr/bin/python python /usr/local/bin/python3.10 1
update-alternatives --install /usr/bin/python python3 /usr/local/bin/python3.10 2
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)" -s --accept-all-defaults
- type: Command
name: "Check Python and OCI CLI versions now"
command: |
which python
python --version
which python2
python2 --version
which python3
python3 -v
which oci
oci -v