[#13] Changed python to python3
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit
Some checks failed
Amarillo/amarillo-gitea/amarillo-core/pipeline/head There was a failure building this commit
This commit is contained in:
parent
1543995ef1
commit
2b37f68228
19
Jenkinsfile
vendored
19
Jenkinsfile
vendored
|
|
@ -1,10 +1,5 @@
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent any
|
||||||
docker {
|
|
||||||
image 'python:3'
|
|
||||||
args '-u root'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
environment {
|
environment {
|
||||||
GITEA_CREDS = credentials('AMARILLO-JENKINS-GITEA-USER')
|
GITEA_CREDS = credentials('AMARILLO-JENKINS-GITEA-USER')
|
||||||
TWINE_REPO_URL = "https://git.gerhardt.io/api/packages/amarillo/pypi"
|
TWINE_REPO_URL = "https://git.gerhardt.io/api/packages/amarillo/pypi"
|
||||||
|
|
@ -17,7 +12,7 @@ pipeline {
|
||||||
stage('Create virtual environment') {
|
stage('Create virtual environment') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Creating virtual environment'
|
echo 'Creating virtual environment'
|
||||||
sh '''python -m venv .venv
|
sh '''python3 -m venv .venv
|
||||||
. .venv/bin/activate'''
|
. .venv/bin/activate'''
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -25,9 +20,9 @@ pipeline {
|
||||||
stage('Installing requirements') {
|
stage('Installing requirements') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Installing packages'
|
echo 'Installing packages'
|
||||||
sh 'python -m pip install -r requirements.txt'
|
sh 'python3 -m pip install -r requirements.txt'
|
||||||
sh 'python -m pip install --upgrade build'
|
sh 'python3 -m pip install --upgrade build'
|
||||||
sh 'python -m pip install --upgrade twine'
|
sh 'python3 -m pip install --upgrade twine'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
|
|
@ -38,12 +33,12 @@ pipeline {
|
||||||
stage('Build package') {
|
stage('Build package') {
|
||||||
steps {
|
steps {
|
||||||
echo 'Building package'
|
echo 'Building package'
|
||||||
sh 'python -m build'
|
sh 'python3 -m build'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Publish package') {
|
stage('Publish package') {
|
||||||
steps {
|
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') {
|
stage('Install docker') {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue