From 2b37f6822879a76d662390d1227e989361302474 Mon Sep 17 00:00:00 2001 From: Francia Csaba Date: Wed, 20 Dec 2023 13:56:50 +0100 Subject: [PATCH] [#13] Changed python to python3 --- Jenkinsfile | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 37b8ab8..502380a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,10 +1,5 @@ pipeline { - agent { - docker { - image 'python:3' - args '-u root' - } - } + agent any environment { GITEA_CREDS = credentials('AMARILLO-JENKINS-GITEA-USER') TWINE_REPO_URL = "https://git.gerhardt.io/api/packages/amarillo/pypi" @@ -17,7 +12,7 @@ pipeline { stage('Create virtual environment') { steps { echo 'Creating virtual environment' - sh '''python -m venv .venv + sh '''python3 -m venv .venv . .venv/bin/activate''' } @@ -25,9 +20,9 @@ pipeline { stage('Installing requirements') { steps { echo 'Installing packages' - sh 'python -m pip install -r requirements.txt' - sh 'python -m pip install --upgrade build' - sh 'python -m pip install --upgrade twine' + sh 'python3 -m pip install -r requirements.txt' + sh 'python3 -m pip install --upgrade build' + sh 'python3 -m pip install --upgrade twine' } } stage('Test') { @@ -38,12 +33,12 @@ pipeline { stage('Build package') { steps { echo 'Building package' - sh 'python -m build' + sh 'python3 -m build' } } stage('Publish package') { steps { - sh 'python -m twine upload --skip-existing --verbose --repository-url $TWINE_REPO_URL --username $GITEA_CREDS_USR --password $GITEA_CREDS_PSW ./dist/*' + sh 'python3 -m twine upload --skip-existing --verbose --repository-url $TWINE_REPO_URL --username $GITEA_CREDS_USR --password $GITEA_CREDS_PSW ./dist/*' } } stage('Install docker') {