Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIAD 3165 Upgrade to python 3.9 from python 3.8 #183

Merged
merged 15 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,46 @@ pipeline {
}

stages {
stage('Build & test Common') {
stage('Determine python version') {
steps {
script {
def python_version = sh(script: "python3 --version", returnStdout: true).trim()
echo "Current Python version: ${python_version}"
}
}
}
stage('Prepare and download Python 3.9') {
steps {
sh 'apt update –fix-missing -y | echo'
sh 'apt install -y build-essential libssl-dev libffi-dev zlib1g-dev libbz2-dev wget curl xz-utils'
sh 'wget https://www.python.org/ftp/python/3.9.19/Python-3.9.19.tgz'
sh 'tar -xvzf Python-3.9.19.tgz'
}
}
stage('Compile and install Python 3.9') {
steps {
dir('Python-3.9.19') {
sh './configure --enable-optimizations'
sh 'make altinstall'
}
}
}
stage('Build & test Common') {
steps {
dir('common') {
buildModules('Installing common dependencies')
executeUnitTestsWithCoverage()
}
}
}
stage('Build & test MHS Common') {
}
stage('Build & test MHS Common') {
steps {
dir('mhs/common') {
buildModules('Installing mhs common dependencies')
executeUnitTestsWithCoverage()
}
}
}
}
stage('Build MHS') {
parallel {
stage('Inbound') {
Expand Down
8 changes: 4 additions & 4 deletions SETUP.MD
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ ___
---
### 3. Terminal actions

Install ``Python 3.8``:
Install ``Python 3.9``:
```shell
brew install python@3.8
brew install python@3.9
brew install pipenv
```

Expand All @@ -46,9 +46,9 @@ Note: If you have ``pyenv`` already installed, ``pipenv`` will get the global se
* `mhs/outbound`


**Install dependencies for `Python 3.8` for each:**
**Install dependencies for `Python 3.9` for each:**
```shell
pipenv --python 3.8
pipenv --python 3.9
```

---
Expand Down
2 changes: 1 addition & 1 deletion common/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ aioboto3 = "~=11.3"
motor = "~=2.1"

[requires]
python_version = "3.8"
python_version = "3.9"

[scripts]
unittests = 'python -m xmlrunner -o test-reports -v'
Expand Down
72 changes: 69 additions & 3 deletions common/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions component-test.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is used to run component tests on CI. Once the component tests don't rely on the common project, this
# file can be moved to a sub directory.
FROM python:3.8-slim-bullseye
FROM python:3.9-slim-bullseye

RUN apt-get update && \
apt-get install -y build-essential libssl-dev swig pkg-config libxml2-dev libxslt-dev python3-dev libffi-dev
Expand All @@ -15,7 +15,7 @@ WORKDIR /test/integration-tests/integration_tests
ENV PYTHONPATH "${PYTHONPATH}:/test/mhs/common"
ENV PYTHONPATH "${PYTHONPATH}:/test/common"

RUN pipenv --python 3.8
RUN pipenv --python 3.9
RUN pipenv install --dev --deploy --ignore-pipfile

ENTRYPOINT pipenv run componenttests
ENTRYPOINT ["pipenv", "run", "componenttests"]
2 changes: 1 addition & 1 deletion examples/SCR/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ scr = {editable = true,path = "."}
integration-adaptors-common = {editable = true, path = "../../common"}

[requires]
python_version = "3.8"
python_version = "3.9"

[scripts]
unittests = "python -m unittest -v"
72 changes: 69 additions & 3 deletions examples/SCR/Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion examples/SCRWebService/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ tornado = "~=6.0"
integration-adaptors-common = {editable = true, path = "../../common"}

[requires]
python_version = "3.8"
python_version = "3.9"

[scripts]
unittests = 'python -m xmlrunner -o test-reports -v'
Expand Down
Loading