Over the past few months I've been working on reviving the Parrot OS Architect ISO and wanted to make a beta-release for folks to test it out without needing to build the ISO for themselves. For those unfamiliar with the old Parrot Architect ISO, it was essentially a Debian Netinstaller specific for Parrot OS. It allowed for far more customizations at installation time and is usually around 10 times smaller than the normal Parrot Live ISO! It is worth noting though that the Architect ISO is solely for installation and cannot be used as a live instance of Parrot. If anyone is interested in the current release of my non-official Architect ISO, it can be downloaded on the releases page. The rest of this article discusses the process used to upload the ISO to GitLab for a release.
GitLab Releases
Being new to using GitLab for my personal projects has led to many new learning experiences! With the creation of the previously mentioned Architect ISO, I wanted to be able to provide a known working ISO file to others in order to have more beta-testers. In Github, this process is very simple/straight-forward but in GitLab this wasn't the case. Now that I've done it, the high-level process is straight forward but very different than GitHub.
- Create a GitLab Personal Access Token (PAT) with API rights
- Obtain the project's GitLab number
- Use Curl to post the binary file(s) to GitLab Packages
- Create a release using the newly created package
Beginning with the assumptions that a project already exists and that a PAT has been obtained, let's walk through how to upload a binary file to a package in GitLab.
Obtain Project ID
Obtaining the Project ID for the project for which the binary file needs to be uploaded is as easy as visiting the project's page on GitLab and then clicking the three dots to the right of the "Fork" button.
Once the project ID and the PAT have been obtained, the CURL utility can be used to upload the necessary binary files to packages within GitLab.
Below is the breakdown of the necessary URL components in the above CURL command.
- GITLAB_PAT -> Gitlab PAT obtained earlier
- PROJECT_ID -> Project ID obtained earlier
- ANY_PACKAGE_NAME -> The desired name for the package on GitLab
- ANY_PACKAGE_VERSION -> The desired version string for the package
- DESIRED_FILENAME -> The desired name for the uploaded file
So what does an end to end curl command look like?
If everything goes well with the upload, the only indication of a successful upload at the command line will be a JSON message that simply says '201 Created'. To confirm the upload, navigate to the project's 'Deploy' -> 'Package Registry' page on the left hand side of the GitLab web interface.
Once on the package registry page, the newly uploaded file should be visible.
Now that the file has been uploaded, the link to the package can be used in a GitLab release as a 'Release Asset' to link the newly uploaded file to the release.
Once the release information has been filled in and the release created, users will be able to visit the release and download the associated files directly from the release page!
While not as easy of a process as GitHub, at least it is still possible to add files to GitLab releases! Hope this helps save someone else some time in the future.