Skip to content

ci: don't pass GIT_EXEC_PATH inside test container #32935

@olegrok

Description

@olegrok

Is there an existing issue for this?

  • I have searched the existing issues

Current behaviour

https://github.com/bitcoin/bitcoin/blob/83ae7802fe14af7eed9edd830f51a3269cc2bd23/ci/test/02_run_container.sh#L15C22-L15C24

If host system is not ubuntu it could set GIT_EXEC_PATH to /usr/libexec/git-core (it should be /usr/lib/git-core) that causes git: 'remote-https' is not a git command. See 'git --help'. error.

You need to change it to something like:

  python3 -c '
import os

exclude = {"HOME", "PATH", "USER", "GIT_EXEC_PATH"}

for key, value in os.environ.items():
    if "\n" in value or key in exclude:
        continue
    print(f"{key}={value}")
' | tee "/tmp/env-$USER-$CONTAINER_NAME"

Expected behaviour

git clone works fine

Steps to reproduce

Run CI script on e.g. awslinux and try to clone something inside build scripts

Relevant log output

No response

How did you obtain Bitcoin Core

Compiled from source

What version of Bitcoin Core are you using?

master

Operating system and version

awslinux

Machine specifications

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions