ci: Changes jenkins pod to use prebuilt poetry
Some checks failed
gitea-physics/pdme/pipeline/head There was a failure building this commit

This commit is contained in:
2022-03-05 16:44:48 -06:00
parent fe97d4a5c5
commit d50fad166b
2 changed files with 4 additions and 8 deletions

6
Jenkinsfile vendored
View File

@@ -12,17 +12,11 @@ pipeline {
parallelsAlwaysFailFast() parallelsAlwaysFailFast()
} }
environment {
POETRY_HOME="/opt/poetry"
POETRY_VERSION="1.1.12"
}
stages { stages {
stage('Build') { stage('Build') {
steps { steps {
echo 'Building...' echo 'Building...'
sh 'python --version' sh 'python --version'
sh 'curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python'
sh '${POETRY_HOME}/bin/poetry --version' sh '${POETRY_HOME}/bin/poetry --version'
sh '${POETRY_HOME}/bin/poetry install' sh '${POETRY_HOME}/bin/poetry install'
} }

View File

@@ -1,9 +1,11 @@
apiVersion: v1 apiVersion: v1
kind: Pod kind: Pod
spec: spec:
imagePullSecrets:
- name: regcreds
containers: # list of containers that you want present for your build, you can define a default container in the Jenkinsfile containers: # list of containers that you want present for your build, you can define a default container in the Jenkinsfile
- name: python - name: poetry
image: python:3.8 image: ghcr.io/dmallubhotla/poetry-image:1
command: ["tail", "-f", "/dev/null"] # this or any command that is bascially a noop is required, this is so that you don't overwrite the entrypoint of the base container command: ["tail", "-f", "/dev/null"] # this or any command that is bascially a noop is required, this is so that you don't overwrite the entrypoint of the base container
imagePullPolicy: Always # use cache or pull image for agent imagePullPolicy: Always # use cache or pull image for agent
resources: # limits the resources your build contaienr resources: # limits the resources your build contaienr