Debian Package builds on Gitlab CI

I am trying to write a Gitlab CI configuration file .gitlab-ci.yml file to build .deb packages.

I want to configure a package to build on a debian docker container. on multiple architectures. and then I want to deploy the generated package to a repository.

I have already referred

This is my current CI configuration file.

My builds for amd64 and i386 architecture are working fine.

I am having the following issues.

  1. My builds for arm64 are not working. (one of the runs here

  2. I am not being able to figure out a way to deploy the built artifacts, i.e the deb packages to a custom debian like apt repository

I have resolved the issue number 2.

To deploy the artifacts, you can have a shared folder between the host and the container. And the host can run a script to automatically deploy the packages found in the shared folder to the repositories using reprepro

Step I
The configurations for this shared folder can be easily done in the gitlab runners configuration file on the host on which the runner is running.
Edit the /etc/gitlab-runner/config.toml on the host which is running the gitlab runner.
Derive the following line inside the configuration.

volumes = ["/cache"]


volumes = ["/cache", "/<path-to-the-folder-on-host>:<path-on-container>:rw"]

make sure that the path-to-the-shared-folder exists on the host. Define the permissions at the end.

Now whenever runner will run a container, it will automatically mount the folder from host to inside of the container.

Step II
About the deployment of the packages from the shared folder to the repository. You can refer the Debian administration documenation on settings for reprepro here . The scripting part is at the end of the page.


Gitlab Runner Configuration
Docker Bind mounts
Reprepro configuration for repositories