[#13] Test: removed python:3 agent
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
b24af469a1
46
Jenkinsfile
vendored
46
Jenkinsfile
vendored
|
|
@ -1,10 +1,4 @@
|
|||
pipeline {
|
||||
agent {
|
||||
docker {
|
||||
image 'python:3'
|
||||
args '-u root'
|
||||
}
|
||||
}
|
||||
environment {
|
||||
GITEA_CREDS = credentials('AMARILLO-JENKINS-GITEA-USER')
|
||||
TWINE_REPO_URL = "https://git.gerhardt.io/api/packages/amarillo/pypi"
|
||||
|
|
@ -14,46 +8,6 @@ pipeline {
|
|||
TAG = 'latest'
|
||||
}
|
||||
stages {
|
||||
stage('Create virtual environment') {
|
||||
steps {
|
||||
echo 'Creating virtual environment'
|
||||
sh '''python -m venv .venv
|
||||
. .venv/bin/activate'''
|
||||
|
||||
}
|
||||
}
|
||||
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'
|
||||
}
|
||||
}
|
||||
stage('Test') {
|
||||
steps {
|
||||
echo 'Testing'
|
||||
}
|
||||
}
|
||||
stage('Build package') {
|
||||
steps {
|
||||
echo 'Building package'
|
||||
sh 'python -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/*'
|
||||
}
|
||||
}
|
||||
stage('Install docker') {
|
||||
steps {
|
||||
echo 'Installing docker'
|
||||
sh 'curl -fsSl https://get.docker.com | sh'
|
||||
echo 'Starting docker daemon'
|
||||
sh 'systemctl start docker'
|
||||
}
|
||||
}
|
||||
stage('Build docker image') {
|
||||
steps {
|
||||
echo 'Building image'
|
||||
|
|
|
|||
Loading…
Reference in a new issue