We handle our deployments via triggering the pipeline of the client repositories via the GitLab API. Each client have their own repository with some config files and instructions how to deploy their application. Via our main application repository we can trigger a deployment by firing an API call to the client repository pipeline. We provide the project id of the client repository and which tag to deploy. This all worked well until yesterday.
Yesterday I needed to create a new client environment. After creating the client repository and adding the project id of this newly created repository in our main repo an issue occurred. The following response we get after firing the api call for the newly created repository:
{"message":"404 Not Found"}
The function we use to trigger the pipeline is
trigger_pipeline <PROJECTID>
and the contents of the underlying function is
function trigger_pipeline(){
curl --request POST \
--form token=$CI_JOB_TOKEN \
--form ref=master \
--form variables[tag]=$CI_APPLICATION_TAG \
--form variables[repository]=$CI_APPLICATION_REPOSITORY \
"https://gitlab.com/api/v4/projects/$1/trigger/pipeline"
}
The name of the repo is master. Main is not being used for this repo so that is not the issue.
I also have access to the client repositories, so $CI_JOB_TOKEN should have access to this as well.
For the other client repositories which were created some time ago everything is working as expected and the API call above will trigger the pipeline of each repository.
Does someone have any idea what could be a potential reason of this issue? Could it be something like caching?