Here's a simple .YML file I'm trying to run on GitLab to have Ubuntu 22.04 to install properly so I can run a make command for the build and test job but the pipeline build always fails(test doesn't execute if build fails);
image: Ubuntu:22.04
before_script:
- apt-get update
- apt-get install -y make
build:
stage: build
script:
- make
test:
stage: test
script:
- make test
And I always get the following error;
Running with gitlab-runner 14.9.1 (bd40e3da)
on gitlab-runner.info.uqam.ca q_fziUMD
Preparing the "docker" executor 00:02
Using Docker executor with image ubuntu:22.04 ...
Authenticating with credentials from $DOCKER_AUTH_CONFIG
Pulling docker image ubuntu:22.04 ...
Using docker image sha256:58db3edaf2be6e80f628796355b1bdeaf8bea1692b402f48b7e7b8d1ff100b02 for ubuntu:22.04 with digest ubuntu@sha256:9a0bdde4188b896a372804be2384015e90e3f84906b750c1a53539b585fbbe7f ...
Preparing environment 00:01
Running on runner-qfziumd-project-7610-concurrent-0 via gitlab-runner...
Getting source from Git repository 00:02
Fetching changes with git depth set to 20...
Reinitialized existing Git repository in /builds/kc391063/inf3135-tp1-h23/.git/
Checking out c7706c7c as main...
Skipping Git submodules setup
Executing "step_script" stage of the job script 00:05
Using docker image sha256:58db3edaf2be6e80f628796355b1bdeaf8bea1692b402f48b7e7b8d1ff100b02 for ubuntu:22.04 with digest ubuntu@sha256:9a0bdde4188b896a372804be2384015e90e3f84906b750c1a53539b585fbbe7f ...
$ apt-get update
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:4 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [801 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB]
Get:6 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
Get:7 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [710 kB]
Get:8 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [5557 B]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [780 kB]
Get:10 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:11 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [10.6 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [758 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1106 kB]
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1012 kB]
Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [49.0 kB]
Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [22.4 kB]
Fetched 25.6 MB in 3s (7351 kB/s)
Reading package lists...
E: Problem executing scripts APT::Update::Post-Invoke 'rm -f /var/cache/apt/archives/*.deb /var/cache/apt/archives/partial/*.deb /var/cache/apt/*.bin || true'
E: Sub-process returned an error code
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
I tried adding to apt-get update -m, --fix-missing, -f or add apt-get clean before update but it either gave me the same error or said something along the line "-f not recognized"
If anyone has any idea of what's going on I would deeply appreciate it.