diff --git a/CHANGELOG.md b/CHANGELOG.md index 8582b7a54..e6a0f0ba6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Added secret scanning in docker plain ([#963](https://github.com/opendevstack/ods-quickstarters/pull/963)) - Added Nodejs20 agent ([#962](https://github.com/opendevstack/ods-quickstarters/issues/962)) - Added java 21 to jdk agent, updated Springboot and Spock quickstarters ([#962](https://github.com/opendevstack/ods-quickstarters/issues/962)) +- Update Streamlit and Python quickstarters and agent ([#968](https://github.com/opendevstack/ods-quickstarters/issues/968)) ### Modified diff --git a/be-python-flask/files/metadata.yml b/be-python-flask/files/metadata.yml index 35a272fad..feacfb6f2 100644 --- a/be-python-flask/files/metadata.yml +++ b/be-python-flask/files/metadata.yml @@ -1,6 +1,6 @@ --- name: Flask -description: "Flask is a micro web framework written in Python. Technologies: Flask 2.2.2, Python 3.9" +description: "Flask is a micro web framework written in Python. Technologies: Flask 3.0.0, Python 3.11" supplier: https://www.palletsprojects.com/p/flask/ version: 4.x type: ods diff --git a/be-python-flask/files/requirements.txt b/be-python-flask/files/requirements.txt index 9e4644e18..2cde62dfb 100644 --- a/be-python-flask/files/requirements.txt +++ b/be-python-flask/files/requirements.txt @@ -1,2 +1,2 @@ -gunicorn==20.1.0 -flask==2.3.2 +gunicorn==21.2.0 +flask==3.0.0 diff --git a/be-python-flask/files/tests_requirements.txt b/be-python-flask/files/tests_requirements.txt index 408da5e34..c5252edcf 100644 --- a/be-python-flask/files/tests_requirements.txt +++ b/be-python-flask/files/tests_requirements.txt @@ -1,6 +1,6 @@ -r ./requirements.txt -mypy==1.3.0 -flake8==6.0.0 -pytest==7.3.1 +mypy==1.7.1 +flake8==6.1.0 +pytest==7.4.3 pytest-cov==4.1.0 diff --git a/common/jenkins-agents/python/docker/Dockerfile.ubi8 b/common/jenkins-agents/python/docker/Dockerfile.ubi8 index 02e46e4c2..d2f2f0c19 100644 --- a/common/jenkins-agents/python/docker/Dockerfile.ubi8 +++ b/common/jenkins-agents/python/docker/Dockerfile.ubi8 @@ -26,7 +26,7 @@ RUN pipVersions=( pip3.8 pip3.9 pip3.11 ); \ fi; \ $pipV config set global.cert /etc/ssl/certs/ca-bundle.crt && \ $pipV install --upgrade pip --user && \ - $pipV install virtualenv==20.23.0 setuptools==67.8.0 Cython==0.29.35 pypandoc==1.11; \ + $pipV install virtualenv==20.25.0 setuptools==69.0.2 Cython==3.0.6 pypandoc==1.12; \ done; # Enables default user to access $HOME folder diff --git a/docs/modules/quickstarters/pages/be-python-flask.adoc b/docs/modules/quickstarters/pages/be-python-flask.adoc index 09a558d47..21b06fcc7 100644 --- a/docs/modules/quickstarters/pages/be-python-flask.adoc +++ b/docs/modules/quickstarters/pages/be-python-flask.adoc @@ -80,7 +80,7 @@ version: 1.0.1 type: ods role: backend runtime: flask -runtimeVersion: 2.2.2 +runtimeVersion: 3.0.0 ``` diff --git a/docs/modules/quickstarters/pages/ds-streamlit.adoc b/docs/modules/quickstarters/pages/ds-streamlit.adoc index 31df7b297..7f23a5ca8 100644 --- a/docs/modules/quickstarters/pages/ds-streamlit.adoc +++ b/docs/modules/quickstarters/pages/ds-streamlit.adoc @@ -75,7 +75,7 @@ version: 1.0.1 type: ods role: dashboard runtime: streamlit -runtimeVersion: 0.18 +runtimeVersion: 1.29.0 ``` == How this quickstarter is built through Jenkins diff --git a/ds-streamlit/files/requirements.txt b/ds-streamlit/files/requirements.txt index c7ddc09d0..41db67856 100644 --- a/ds-streamlit/files/requirements.txt +++ b/ds-streamlit/files/requirements.txt @@ -1,3 +1,3 @@ -streamlit==1.22.0 -plotly==5.14.1 -pandas==2.0.2 +streamlit==1.29.0 +plotly==5.18.0 +pandas==2.1.4 diff --git a/ds-streamlit/files/test_requirements.txt b/ds-streamlit/files/test_requirements.txt index ca60e2e74..3b4425cc7 100644 --- a/ds-streamlit/files/test_requirements.txt +++ b/ds-streamlit/files/test_requirements.txt @@ -1,7 +1,7 @@ -r ./requirements.txt -mypy==1.3.0 -flake8==6.0.0 -pytest==7.3.1 +mypy==1.7.1 +flake8==6.1.0 +pytest==7.4.3 pytest-cov==4.1.0 -black==23.3.0 +black==23.11.0 diff --git a/ds-streamlit/testdata/golden/jenkins-build-stages.json b/ds-streamlit/testdata/golden/jenkins-build-stages.json new file mode 100644 index 000000000..5fbaa4cce --- /dev/null +++ b/ds-streamlit/testdata/golden/jenkins-build-stages.json @@ -0,0 +1,42 @@ +[ + { + "stage": "odsPipeline start", + "status": "SUCCESS" + }, + { + "stage": "Create virtualenv for tests", + "status": "SUCCESS" + }, + { + "stage": "Linter", + "status": "SUCCESS" + }, + { + "stage": "Unit Test", + "status": "SUCCESS" + }, + { + "stage": "Build", + "status": "SUCCESS" + }, + { + "stage": "SonarQube Analysis", + "status": "SUCCESS" + }, + { + "stage": "Build OpenShift Image", + "status": "SUCCESS" + }, + { + "stage": "Build OpenShift Image (streamlit-oauth)", + "status": "SUCCESS" + }, + { + "stage": "Deploy to OpenShift", + "status": "SUCCESS" + }, + { + "stage": "odsPipeline finished", + "status": "SUCCESS" + } +] diff --git a/ds-streamlit/testdata/golden/jenkins-provision-stages.json b/ds-streamlit/testdata/golden/jenkins-provision-stages.json new file mode 100644 index 000000000..b4168f8a2 --- /dev/null +++ b/ds-streamlit/testdata/golden/jenkins-provision-stages.json @@ -0,0 +1,30 @@ +[ + { + "stage": "Checkout quickstarter", + "status": "SUCCESS" + }, + { + "stage": "Initialize output directory", + "status": "SUCCESS" + }, + { + "stage": "Copy files from quickstarter", + "status": "SUCCESS" + }, + { + "stage": "Setup OpenShift resources", + "status": "SUCCESS" + }, + { + "stage": "Create Jenkinsfile", + "status": "SUCCESS" + }, + { + "stage": "Create sonar-project.properties", + "status": "SUCCESS" + }, + { + "stage": "Push to remote", + "status": "SUCCESS" + } +] diff --git a/ds-streamlit/testdata/golden/sonar-scan.json b/ds-streamlit/testdata/golden/sonar-scan.json new file mode 100644 index 000000000..559ca033b --- /dev/null +++ b/ds-streamlit/testdata/golden/sonar-scan.json @@ -0,0 +1,25 @@ +{ + "key": "{{.ProjectID}}-{{.ComponentID}}", + "name": "{{.ProjectID}}-{{.ComponentID}}", + "isFavorite": false, + "visibility": "public", + "extensions": [], + "qualityProfiles": [ + { + "name": "{{.SonarQualityProfile}}", + "language": "py", + "deleted": false + } + ], + "qualityGate": { + "name": "Sonar way", + "isDefault": true + }, + "breadcrumbs": [ + { + "key": "{{.ProjectID}}-{{.ComponentID}}", + "name": "{{.ProjectID}}-{{.ComponentID}}", + "qualifier": "TRK" + } + ] +} diff --git a/ds-streamlit/testdata/steps.yml b/ds-streamlit/testdata/steps.yml new file mode 100644 index 000000000..c5b100cd0 --- /dev/null +++ b/ds-streamlit/testdata/steps.yml @@ -0,0 +1,27 @@ +componentID: streamlit +steps: +- type: provision + provisionParams: + verify: + jenkinsStages: golden/jenkins-provision-stages.json +- type: build + buildParams: + verify: + jenkinsStages: golden/jenkins-build-stages.json + sonarScan: golden/sonar-scan.json + runAttachments: + - SCRR-{{.ProjectID}}-{{.ComponentID}}.docx + - SCRR-{{.ProjectID}}-{{.ComponentID}}.md + openShiftResources: + imageTags: + - name: "{{.ComponentID}}" + tag: latest + - name: "{{.ComponentID}}-oauth" + tag: latest + imageStreams: + - "{{.ComponentID}}" + - "{{.ComponentID}}-oauth" + deploymentConfigs: + - "{{.ComponentID}}" + services: + - "{{.ComponentID}}-oauth"