diff --git a/Jenkinsfile b/Jenkinsfile index 11799d2..687317d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,26 +22,25 @@ pipeline { 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' + sh 'poetry --version' + sh 'poetry install' } } stage('Test') { parallel{ stage('pytest') { steps { - sh '${POETRY_HOME}/bin/poetry run pytest' + sh 'poetry run pytest' } } stage('lint') { steps { - sh '${POETRY_HOME}/bin/poetry run flake8 deepdog tests' + sh 'poetry run flake8 deepdog tests' } } stage('mypy') { steps { - sh '${POETRY_HOME}/bin/poetry run mypy deepdog' + sh 'poetry run mypy deepdog' } } } @@ -57,7 +56,7 @@ pipeline { } steps { echo 'Deploying...' - sh '${POETRY_HOME}/bin/poetry publish -u ${PYPI_USR} -p ${PYPI_PSW} --build' + sh 'poetry publish -u ${PYPI_USR} -p ${PYPI_PSW} --build' } } 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