From bc79a1159ca5b94f4c2b2cdd63027b09cf4b9680 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:16:09 +0100 Subject: [PATCH 01/18] quotes in jf --- Jenkinsfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 997a262..71a5ced 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -114,6 +114,17 @@ } } + stage('Execute Export Script TERRAFORM') { + steps { + + sh 'chmod 755 ./bin/terraform-provider-dynatrace_v1.9.1' + + //Only required once CN is not reachable from EMEA + //loopEnvironments(environments) + } + + } + stage('Execute Export Script TERRAFORM') { steps { From 4172f5d9661887f1e4d0478512c02ef131e05da9 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:16:28 +0100 Subject: [PATCH 02/18] adapting jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 71a5ced..bd4b184 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -114,7 +114,7 @@ } } - stage('Execute Export Script TERRAFORM') { + stage('Make exporter executable') { steps { sh 'chmod 755 ./bin/terraform-provider-dynatrace_v1.9.1' From 614e262ec61d9b3b2f8c6f4bbc92ab71021e8200 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:21:14 +0100 Subject: [PATCH 03/18] adapting jenkinsfile --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index bd4b184..c388268 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,6 +118,7 @@ steps { sh 'chmod 755 ./bin/terraform-provider-dynatrace_v1.9.1' + sh 'python3 --version' //Only required once CN is not reachable from EMEA //loopEnvironments(environments) From b291b2a30870b2286543cefe95995cc18615578c Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:29:07 +0100 Subject: [PATCH 04/18] adapting jenkinsfile --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index c388268..5526070 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,7 +118,8 @@ steps { sh 'chmod 755 ./bin/terraform-provider-dynatrace_v1.9.1' - sh 'python3 --version' + sh 'chmod 755 ./installpyenv.sh' + sh './installpyenv.sh' //Only required once CN is not reachable from EMEA //loopEnvironments(environments) From 3346ea13374e9e85420173cbe2d481e6a0395c51 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:29:38 +0100 Subject: [PATCH 05/18] adapting jenkinsfile --- installpyenv.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 installpyenv.sh diff --git a/installpyenv.sh b/installpyenv.sh new file mode 100644 index 0000000..1f99532 --- /dev/null +++ b/installpyenv.sh @@ -0,0 +1,28 @@ +# !/bin/bash + +# Step 1. Install pyenv + +git clone https://github.com/pyenv/pyenv.git ~/.pyenv +echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc +source ~/.bashrc + +# Step 2. Install missing headers for all the Python modules to be built and make sure gcc is installed + +sudo zypper install readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc + +# Step 3. Install the desired Python version + +pyenv install 3.7.4 + +# Step 4. Install virtualenv + +sudo zypper install python3-virtualenv + +# Step 5. Create a virtual environment for the installed Python and activate it + +mkdir ~/pythons +cd ~/pythons +virtualenv -p ~/.pyenv/versions/3.7.4/bin/python3.7 python3.7.4 +source ./python3.7.4/bin/activate \ No newline at end of file From 335826672ce021368865b99c92dfab520e8fe3bd Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:31:52 +0100 Subject: [PATCH 06/18] adapting jenkinsfile --- installpyenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installpyenv.sh b/installpyenv.sh index 1f99532..3b6c795 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -18,7 +18,7 @@ pyenv install 3.7.4 # Step 4. Install virtualenv -sudo zypper install python3-virtualenv +sudo zypper install -y python3-virtualenv # Step 5. Create a virtual environment for the installed Python and activate it From d576a6f53faa86a27ed8f705c3941c4d1e3260b9 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:32:55 +0100 Subject: [PATCH 07/18] adapting jenkinsfile --- installpyenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installpyenv.sh b/installpyenv.sh index 3b6c795..1f72c74 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -18,7 +18,7 @@ pyenv install 3.7.4 # Step 4. Install virtualenv -sudo zypper install -y python3-virtualenv +sudo zypper install --non-interactive python3-virtualenv # Step 5. Create a virtual environment for the installed Python and activate it From ffa0c2cd978b37cc2c5dd142677e22c5293534f1 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:34:42 +0100 Subject: [PATCH 08/18] adapting jenkinsfile --- installpyenv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installpyenv.sh b/installpyenv.sh index 1f72c74..e9d8f21 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -10,7 +10,7 @@ source ~/.bashrc # Step 2. Install missing headers for all the Python modules to be built and make sure gcc is installed -sudo zypper install readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc +sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc # Step 3. Install the desired Python version @@ -18,7 +18,7 @@ pyenv install 3.7.4 # Step 4. Install virtualenv -sudo zypper install --non-interactive python3-virtualenv +sudo zypper install -y python3-virtualenv # Step 5. Create a virtual environment for the installed Python and activate it From 93656c1a4666ae4316f3d2536e802c3f333f27e0 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:45:52 +0100 Subject: [PATCH 09/18] adapting jenkinsfile --- installpyenv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installpyenv.sh b/installpyenv.sh index e9d8f21..88b67e8 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -18,8 +18,8 @@ pyenv install 3.7.4 # Step 4. Install virtualenv -sudo zypper install -y python3-virtualenv - +#sudo zypper install -y python3-virtualenv +pip3 install virtualenv # Step 5. Create a virtual environment for the installed Python and activate it mkdir ~/pythons From 619ae2b23be6758cb9d935f73f4b7ecbf7bb1b15 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:47:17 +0100 Subject: [PATCH 10/18] adapting jenkinsfile --- installpyenv.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/installpyenv.sh b/installpyenv.sh index 88b67e8..52c5e81 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -10,16 +10,16 @@ source ~/.bashrc # Step 2. Install missing headers for all the Python modules to be built and make sure gcc is installed -sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc +#sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc # Step 3. Install the desired Python version -pyenv install 3.7.4 +#pyenv install 3.7.4 # Step 4. Install virtualenv #sudo zypper install -y python3-virtualenv -pip3 install virtualenv +#pip3 install virtualenv # Step 5. Create a virtual environment for the installed Python and activate it mkdir ~/pythons From 5d3367b482de3ca6c5cb579e2e2a13cb6b1512c4 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:48:01 +0100 Subject: [PATCH 11/18] adapting jenkinsfile --- installpyenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installpyenv.sh b/installpyenv.sh index 52c5e81..41cdb13 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -19,7 +19,7 @@ source ~/.bashrc # Step 4. Install virtualenv #sudo zypper install -y python3-virtualenv -#pip3 install virtualenv +pip3 install virtualenv # Step 5. Create a virtual environment for the installed Python and activate it mkdir ~/pythons From 1f618392b7773a34a7fe78eef8532dea6effacf9 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:49:15 +0100 Subject: [PATCH 12/18] adapting jenkinsfile --- installpyenv.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installpyenv.sh b/installpyenv.sh index 41cdb13..6189766 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -19,7 +19,7 @@ source ~/.bashrc # Step 4. Install virtualenv #sudo zypper install -y python3-virtualenv -pip3 install virtualenv +pip3 install --user virtualenv # Step 5. Create a virtual environment for the installed Python and activate it mkdir ~/pythons From 0c3ba5be138180f84edade21005bce01d41b4558 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:50:11 +0100 Subject: [PATCH 13/18] adapting jenkinsfile --- installpyenv.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/installpyenv.sh b/installpyenv.sh index 6189766..127152e 100644 --- a/installpyenv.sh +++ b/installpyenv.sh @@ -22,7 +22,7 @@ source ~/.bashrc pip3 install --user virtualenv # Step 5. Create a virtual environment for the installed Python and activate it -mkdir ~/pythons -cd ~/pythons +#mkdir ~/pythons +#cd ~/pythons virtualenv -p ~/.pyenv/versions/3.7.4/bin/python3.7 python3.7.4 source ./python3.7.4/bin/activate \ No newline at end of file From 92a8ed7d588a2b80aa5d1c2535e4b40c5137e0dd Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:53:06 +0100 Subject: [PATCH 14/18] adapting jenkinsfile --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5526070..7a59b9a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -118,8 +118,10 @@ steps { sh 'chmod 755 ./bin/terraform-provider-dynatrace_v1.9.1' - sh 'chmod 755 ./installpyenv.sh' - sh './installpyenv.sh' + sh 'sudo zypper refresh' + sh 'sudo zypper -y update' + //sh 'chmod 755 ./installpyenv.sh' + //sh './installpyenv.sh' //Only required once CN is not reachable from EMEA //loopEnvironments(environments) From 85a0c3aa3585b7cc20ff978d6fdd4f6305b7e24a Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 17:59:58 +0100 Subject: [PATCH 15/18] adapting jenkinsfile --- Jenkinsfile | 6 +++--- installpyenv.sh | 28 ---------------------------- 2 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 installpyenv.sh diff --git a/Jenkinsfile b/Jenkinsfile index 7a59b9a..35315ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -119,9 +119,9 @@ sh 'chmod 755 ./bin/terraform-provider-dynatrace_v1.9.1' sh 'sudo zypper refresh' - sh 'sudo zypper -y update' - //sh 'chmod 755 ./installpyenv.sh' - //sh './installpyenv.sh' + + sh 'chmod 755 ./updatepython.sh' + sh './updatepython.sh' //Only required once CN is not reachable from EMEA //loopEnvironments(environments) diff --git a/installpyenv.sh b/installpyenv.sh deleted file mode 100644 index 127152e..0000000 --- a/installpyenv.sh +++ /dev/null @@ -1,28 +0,0 @@ -# !/bin/bash - -# Step 1. Install pyenv - -git clone https://github.com/pyenv/pyenv.git ~/.pyenv -echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc -echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc -echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc -source ~/.bashrc - -# Step 2. Install missing headers for all the Python modules to be built and make sure gcc is installed - -#sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc - -# Step 3. Install the desired Python version - -#pyenv install 3.7.4 - -# Step 4. Install virtualenv - -#sudo zypper install -y python3-virtualenv -pip3 install --user virtualenv -# Step 5. Create a virtual environment for the installed Python and activate it - -#mkdir ~/pythons -#cd ~/pythons -virtualenv -p ~/.pyenv/versions/3.7.4/bin/python3.7 python3.7.4 -source ./python3.7.4/bin/activate \ No newline at end of file From 29be342bde7b1212b7a3c328bf287db072b506b4 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 18:01:59 +0100 Subject: [PATCH 16/18] adapting jenkinsfile --- _installpyenv.sh | 28 ++++++++++++++++++++++++++++ updatepython.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 _installpyenv.sh create mode 100644 updatepython.sh diff --git a/_installpyenv.sh b/_installpyenv.sh new file mode 100644 index 0000000..127152e --- /dev/null +++ b/_installpyenv.sh @@ -0,0 +1,28 @@ +# !/bin/bash + +# Step 1. Install pyenv + +git clone https://github.com/pyenv/pyenv.git ~/.pyenv +echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc +echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc +echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc +source ~/.bashrc + +# Step 2. Install missing headers for all the Python modules to be built and make sure gcc is installed + +#sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc + +# Step 3. Install the desired Python version + +#pyenv install 3.7.4 + +# Step 4. Install virtualenv + +#sudo zypper install -y python3-virtualenv +pip3 install --user virtualenv +# Step 5. Create a virtual environment for the installed Python and activate it + +#mkdir ~/pythons +#cd ~/pythons +virtualenv -p ~/.pyenv/versions/3.7.4/bin/python3.7 python3.7.4 +source ./python3.7.4/bin/activate \ No newline at end of file diff --git a/updatepython.sh b/updatepython.sh new file mode 100644 index 0000000..67d1a8c --- /dev/null +++ b/updatepython.sh @@ -0,0 +1,27 @@ +# !/bin/bash + +# Step 1. Install pyenv + +sudo zipper refresh +sudo zipper update -y +sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc make +cd /tmp +wget https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz +tar -xvf Python-3.8.7.tgz +cd Python-3.8.7/ + +./configure +make +make install + +echo ‘export PATH=”$PATH/root/Python-3.8.7/”’>> ~/.bashrc +source ~/.bashrc + +python3 --version +# Step 3. Install the desired Python version + +#pyenv install 3.7.4 + +# Step 4. Install virtualenv + +#sudo zypper install -y python3-virtualenv From 76192fe100623761513b60d685f1d33d5dd40d8a Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 18:07:40 +0100 Subject: [PATCH 17/18] adapting jenkinsfile --- updatepython.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/updatepython.sh b/updatepython.sh index 67d1a8c..1e7fc7c 100644 --- a/updatepython.sh +++ b/updatepython.sh @@ -4,20 +4,22 @@ sudo zipper refresh sudo zipper update -y -sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc make -cd /tmp -wget https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz -tar -xvf Python-3.8.7.tgz -cd Python-3.8.7/ +sudo zipper install -y python38 +#sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc make +#cd /tmp +#wget https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz +#tar -xvf Python-3.8.7.tgz +#cd Python-3.8.7/ -./configure -make -make install +#./configure +#make +#make install -echo ‘export PATH=”$PATH/root/Python-3.8.7/”’>> ~/.bashrc -source ~/.bashrc +#echo ‘export PATH=”$PATH/root/Python-3.8.7/”’>> ~/.bashrc +#source ~/.bashrc python3 --version +python38 --version # Step 3. Install the desired Python version #pyenv install 3.7.4 From ff34d1a59b3d36b12ed7fbeee7418db411985e32 Mon Sep 17 00:00:00 2001 From: rforstner Date: Wed, 26 Jan 2022 18:08:26 +0100 Subject: [PATCH 18/18] adapting jenkinsfile --- updatepython.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/updatepython.sh b/updatepython.sh index 1e7fc7c..9c72b58 100644 --- a/updatepython.sh +++ b/updatepython.sh @@ -2,9 +2,9 @@ # Step 1. Install pyenv -sudo zipper refresh -sudo zipper update -y -sudo zipper install -y python38 +sudo zypper refresh +sudo zypper update -y +sudo zypper install -y python38 #sudo zypper install -y readline-devel sqlite3-devel libbz2-devel zlib-devel libopenssl-devel libffi-devel gcc make #cd /tmp #wget https://www.python.org/ftp/python/3.8.7/Python-3.8.7.tgz