From d50fad166bfdedc445ce5df9c95074a81b773c7e Mon Sep 17 00:00:00 2001 From: Deepak Mallubhotla Date: Sat, 5 Mar 2022 16:44:48 -0600 Subject: [PATCH] ci: Changes jenkins pod to use prebuilt poetry --- Jenkinsfile | 6 ------ jenkins/ci-agent-pod.yaml | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 04919da..3c88082 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -12,17 +12,11 @@ pipeline { parallelsAlwaysFailFast() } - environment { - POETRY_HOME="/opt/poetry" - POETRY_VERSION="1.1.12" - } - stages { stage('Build') { steps { echo 'Building...' 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 install' } diff --git a/jenkins/ci-agent-pod.yaml b/jenkins/ci-agent-pod.yaml index 80ea7d3..f3ed483 100644 --- a/jenkins/ci-agent-pod.yaml +++ b/jenkins/ci-agent-pod.yaml @@ -1,9 +1,11 @@ apiVersion: v1 kind: Pod spec: + imagePullSecrets: + - name: regcreds containers: # list of containers that you want present for your build, you can define a default container in the Jenkinsfile - - name: python - image: python:3.8 + - name: poetry + 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 imagePullPolicy: Always # use cache or pull image for agent resources: # limits the resources your build contaienr