I am exploring Gitlab APIs to work with CICD. For updating gitlab CICD variable, I use following API
PUT /projects/:id/variables/:key
here is the document regarding it. This API works perfect if the variable is unique for CICD. But If I use duplicate name variable with different environment_scope, it some time update my variable but most time fail to update. It throws following error
key: [MY_KEY] has already been taken
I checked in gitlab issues here but didn't found any proper solution regarding it. For reference, my gitlab version is GitLab Community Edition 12.8.1
Can anybody help me regarding this?.. Thanks in advance.