I am trying to download job artifacts using REST API.
I was going thorough the documentation of gitlab and found out there is this API
GET /projects/:id/jobs/artifacts/:ref_name/download?job=name
that can give us latest successful build from the particular job. I was able to download the dev build.
To give you more context about this, there are multiple jobs setups for dev, stage and production environment. But the issue is that I am only able to dev environment build. Whenever I am using staging job name in the API, it is giving me 404. Ideally it should let me download the latest build available in staging job but that is happening. And this is happening for android and iOS both. What could be the possible issue here? Do we have to change something in the repo that can allow us to download all the type of builds?
YAML File
build:
needs: [ lint,detekt ]
variables:
BUILD_VARIANT: devRelease
build:tmus-prod-release-apk:
when: manual
variables:
BUILD_VARIANT: productionRelease
Versions
- GitLab Runner, Running with gitlab-runner 16.10.0