gitlab-download-artifacts
=========================
This Python utility is used to download artifacts from gitlab ci.
It can be used to grab artifacts from a CI job matching a git repo (or submodule) at the current commit, or
from the https url of a repo, optionally at provided commit ref
gitlab-ci usage
---------------
When used in Gitlab CI a project / private token with api access will be required or user:pass specified in the url.
Currently (Jan 2022) the CI Job Token doesn't have enough api access to find the correct artifacts to download.
developer/desktop usage
-----------------------
If run from desktop the default browser will be used, however in this case an ``@<commit hash>`` cannot be used as
the gitlab artifact urls don't support this: https://docs.gitlab.com/ee/api/job_artifacts.html#download-the-artifacts-archive
gitlab-download-artifacts options
---------------------------------
To download build artifacts for the current git project, simply run the tool from within the project folder and refer to the job whose artifacts are needed, eg:
::
cd myproject
gitlab-download-artifacts . build
The artifacts from the ``build`` job are downloaded and extracted into the repo folder.
To download the artifacts for a submodule it can be used like:
::
gitlab-download-artifacts ./submodule build
The artifacts will be downloaded from the commit the submodule is checked out at and expanded into its folder.
Alternatively to just grab from a project page:
::
gitlab-download-artifacts https://gitlab.com/alelec/gitlab-download-artifacts@65ad5e1 release
Command Line
------------
::
usage: gitlab-download-artifacts [-h] [-p PROJECT_TOKEN] [-t TIMEOUT] target job
Download gitlab artifacts
positional arguments:
target Path to git repo to grab or repo url (optionally with @<commit>)
job Gitlab CI job name to grab from
optional arguments:
-h, --help show this help message and exit
-p PROJECT_TOKEN, --project-token PROJECT_TOKEN Project / private token to auth with, env: ${PROJECT_TOKEN} by default
-t TIMEOUT, --timeout TIMEOUT Timeout (in minutes) to wait for dependent jobs to be ready
version: 1.4+g4a2cb1e
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/alelec/gitlab-download-artifacts",
"name": "gitlab-download-artifacts",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Andrew Leech",
"author_email": "andrew@alelec.net",
"download_url": "",
"platform": null,
"description": "gitlab-download-artifacts\n=========================\n\nThis Python utility is used to download artifacts from gitlab ci.\n\nIt can be used to grab artifacts from a CI job matching a git repo (or submodule) at the current commit, or\nfrom the https url of a repo, optionally at provided commit ref\n\ngitlab-ci usage\n---------------\n\nWhen used in Gitlab CI a project / private token with api access will be required or user:pass specified in the url.\nCurrently (Jan 2022) the CI Job Token doesn't have enough api access to find the correct artifacts to download.\n\ndeveloper/desktop usage\n-----------------------\n\nIf run from desktop the default browser will be used, however in this case an ``@<commit hash>`` cannot be used as\nthe gitlab artifact urls don't support this: https://docs.gitlab.com/ee/api/job_artifacts.html#download-the-artifacts-archive\n\n\ngitlab-download-artifacts options\n---------------------------------\n\nTo download build artifacts for the current git project, simply run the tool from within the project folder and refer to the job whose artifacts are needed, eg:\n\n::\n\n cd myproject\n gitlab-download-artifacts . build\n\nThe artifacts from the ``build`` job are downloaded and extracted into the repo folder.\n\n\nTo download the artifacts for a submodule it can be used like:\n\n::\n\n gitlab-download-artifacts ./submodule build\n\nThe artifacts will be downloaded from the commit the submodule is checked out at and expanded into its folder.\n\nAlternatively to just grab from a project page:\n\n::\n\n gitlab-download-artifacts https://gitlab.com/alelec/gitlab-download-artifacts@65ad5e1 release\n\nCommand Line\n------------\n\n::\n\n usage: gitlab-download-artifacts [-h] [-p PROJECT_TOKEN] [-t TIMEOUT] target job\n\n Download gitlab artifacts\n\n positional arguments:\n target Path to git repo to grab or repo url (optionally with @<commit>)\n job Gitlab CI job name to grab from\n\n optional arguments:\n -h, --help show this help message and exit\n -p PROJECT_TOKEN, --project-token PROJECT_TOKEN Project / private token to auth with, env: ${PROJECT_TOKEN} by default\n -t TIMEOUT, --timeout TIMEOUT Timeout (in minutes) to wait for dependent jobs to be ready\n\n\nversion: 1.4+g4a2cb1e\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Download the gitlab artifacts matching a git repo or submodule, or provided repo http url (optionally with @<commit>)",
"version": "1.4",
"project_urls": {
"Homepage": "https://gitlab.com/alelec/gitlab-download-artifacts"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ddf92cc87ea94901fbdbedc255862a3d2947c74722e44f51583116656798d2cf",
"md5": "e77b1e13a965710f8d023471bbcf1b75",
"sha256": "02c0b32e183db61aef86e27f556280c55b94de47aeaf3ffeeaebe3768d49c490"
},
"downloads": -1,
"filename": "gitlab_download_artifacts-1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e77b1e13a965710f8d023471bbcf1b75",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 6413,
"upload_time": "2024-01-17T02:34:07",
"upload_time_iso_8601": "2024-01-17T02:34:07.262146Z",
"url": "https://files.pythonhosted.org/packages/dd/f9/2cc87ea94901fbdbedc255862a3d2947c74722e44f51583116656798d2cf/gitlab_download_artifacts-1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-17 02:34:07",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "alelec",
"gitlab_project": "gitlab-download-artifacts",
"lcname": "gitlab-download-artifacts"
}