Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symlink permission error when trying to use binarySource=install #368

Closed
florianklumb opened this issue Apr 28, 2022 · 4 comments
Closed

Comments

@florianklumb
Copy link

florianklumb commented Apr 28, 2022

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

32.32.5 (renovate/renovate Docker image)

Please select which platform you are using if self-hosting.

GitLab self-hosted / Jenkins with Docker

If you're self-hosting Renovate, tell us what version of the platform you run.

14.8.5

Was this something which used to work for you, and then stopped?

I never saw this working

Describe the bug

I have the same problem as described in renovatebot/renovate#14409 (reply in thread)
When using binarySource=install with npm/node versions specified as engines in package.json and BUILDPACK=true set (cf. renovatebot/renovate#14409 (reply in thread)) I get the following error

DEBUG: Using node constraint "16.14.0" from package.json (repository=MY_REPO, branch=renovate/react-select-5.x)
DEBUG: Using buildpack dynamic installs (repository=MY_REPO, branch=renovate/react-select-5.x)
DEBUG: Executing command (repository=MY_REPO, branch=renovate/react-select-5.x)
       "command": "install-tool npm 8.3.1"
DEBUG: rawExec err (repository=MY_REPO, branch=renovate/react-select-5.x)
       "err": {
         "killed": false,
         "code": 1,
         "signal": null,
         "cmd": "install-tool npm 8.3.1",
         "stdout": "Installing legacy tool npm v8.3.1\n/home/ubuntu/npm/8.3.1/bin/npm -> /home/ubuntu/npm/8.3.1/lib/node_modules/npm/bin/npm-cli.js\n/home/ubuntu/npm/8.3.1/bin/npx -> /home/ubuntu/npm/8.3.1/lib/node_modules/npm/bin/npx-cli.js\n+ [email protected]\nadded 214 packages from 96 contributors in 5.004s\n",
         "stderr": "ln: failed to create symbolic link '/usr/local/bin/npm': Permission denied\n",
         "message": "Command failed: install-tool npm 8.3.1\nln: failed to create symbolic link '/usr/local/bin/npm': Permission denied\n",
         "stack": "Error: Command failed: install-tool npm 8.3.1\nln: failed to create symbolic link '/usr/local/bin/npm': Permission denied\n\n    at ChildProcess.exithandler (child_process.js:383:12)\n    at ChildProcess.emit (events.js:400:28)\n    at ChildProcess.emit (domain.js:475:12)\n    at maybeClose (internal/child_process.js:1058:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:293:5)"
       }

I assumed this was mitigated/solved by #346 but it doesn't seem so. Any ideas?

@florianklumb florianklumb changed the title Permission error when trying to use binarySource=install Symlink permission error when trying to use binarySource=install Apr 28, 2022
@Chumper
Copy link
Collaborator

Chumper commented Apr 28, 2022

How do you start the docker container?

@florianklumb
Copy link
Author

florianklumb commented Apr 28, 2022

Here is an excerpt from the Jenkinsfile:

pipeline {
    agent {
        docker {
            label buildAgents.DOCKER_AVAILABLE
            image 'renovate/renovate:32.32.5'
            args '-v /var/run/docker.sock:/var/run/docker.sock -v /tmp:/tmp'
        }
    }

    environment {
        CONFIGURATION = 'Release'
        TZ = 'Europe/Berlin'
        ENV = '/usr/local/etc/env'
        RENOVATE_TOKEN = credentials('...')
        RENOVATE_DOCKER_USER = 'root'
        GITHUB_COM_TOKEN = credentials('...')
        RENOVATE_BINARY_SOURCE = 'install'
        BUILDPACK = true
    }

    parameters {
        string defaultValue: '', description: '', name: 'RENOVATE_ARGS', trim: true
    }

    stages {
        stage('init') {
            steps {
                sh 'renovate --version'
                sh 'rm -f renovate.log'
            }
        }

        stage('renovate') {
            steps {
                sh 'renovate --log-file renovate.log --log-file-level debug ${params.RENOVATE_ARGS}'
            }
        }
    }
}

@viceice
Copy link
Member

viceice commented Apr 28, 2022

@florianklumb why did you closed the issue?

@florianklumb
Copy link
Author

Sorry for the mixup. I thought I should've opened a discussion instead but you guys were too fast to reply :-)

@containerbase containerbase locked and limited conversation to collaborators Apr 28, 2022
@viceice viceice converted this issue into discussion #370 Apr 28, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants