相关疑难解决方法(0)

How to dynamically add Jenkins user and permissions inside Docker container

When I am building a declarative Jenkins pipeline for my python project, I get the following error message when using Pip.

WARNING: The directory '/.cache/pip' or its parent directory is not owned or is not writable by the current user.
Run Code Online (Sandbox Code Playgroud)

My Jenkinsfile:

#!groovy

pipeline {
    agent {
        docker {
            image 'python:3.7.5'
        }
    }

    stages {
        stage('Build Dependencies') {
            steps {
                sh "pip install -r requirements.txt"
            }
        }
}
    post {
        always {
            sh "Job finished"
        }
    }
}
Run Code Online (Sandbox Code Playgroud)

How …

python jenkins docker jenkins-pipeline

3
推荐指数
1
解决办法
5036
查看次数

标签 统计

docker ×1

jenkins ×1

jenkins-pipeline ×1

python ×1