Morning everyone! I've set up a very simple Gitlab...
# general
a
Morning everyone! I've set up a very simple Gitlab pipeline with a single job that simply runs
./pants --version
. The job keeps failing with the error below. Wondering if there is some additional bootstrapping needed for Gitlab or if maybe this issue could be due to network restrictions within the runner? Error:
Copy code
$ $CI_PROJECT_DIR/pants --version
29Bootstrapping Pants using /usr/bin/python3.8
30Creating the virtualenv PEX.
31Downloading the Pex PEX.
32Traceback (most recent call last):
33  File "<stdin>", line 4, in <module>
34FileNotFoundError: [Errno 2] No such file or directory: 'pex'
35SHA256 of <https://github.com/pantsbuild/pex/releases/download/v2.1.62/pex> is not as expected. Aborting.

37
Cleaning up file based variables
.gitlab-ci.yml:
Copy code
image:  path_to_enterprise_image
default:
    tags: ['edopplatform-v3-dev-runner']

stages:
    - setup-pants

setup-pants-job:
    stage: setup-pants
    script:
        - $CI_PROJECT_DIR/pants --version
p
maybe tweak the pants script to be more verbose to see the exact failure? you can do that by changing
set -eou pipefail
to
set -eoux pipefail
also make sure the image has
python3-distutils
and
python3-dev
i.e. your CI image build script should have something like:
Copy code
RUN apt-get update && \
    apt-get install --no-install-recommends -y \
    curl gcc libssl-dev git unzip python3-distutils python3-dev && \
    apt-get clean && rm -rf /var/lib/apt/lists/*
👍 1
a
Perfect! I'll give this a shot this week and report back. Thank you!
👍 1
This was due to firewall issues. Will need to upload pex + other deps to internal artifactory and configure pants to pull down from it. Thanks again!
💯 1
🎉 1