[#13] Changed python to python3
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit

This commit is contained in:
Csaba 2023-12-20 13:56:50 +01:00
parent 1543995ef1
commit 2b37f68228

19
Jenkinsfile vendored
View file

@ -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') {