Gitlab api set CICD separated caches not working

59 views Asked by At

I am trying to set my Gitlab project CICD configuration via API for both skipped outdated deployment and use separated cached for protected branches. I am able to send request to change skipped outdated deployment successfully but not use separated cached. Can someone help me spot the issue ?

Gitlab Info

GitLab Enterprise Edition 14.10.4-ee

Request Skipped Outdated Deployment (SUCCESS)

curl -vs -X PUT -H 'PRIVATE-TOKEN: redacted' \
--url 'https://gitlab.<redacted>/api/v4/projects/2934' \
--data 'ci_forward_deployment_enabled=false'

Response Success
{"id":2934,"description":"","name":....}

Request Use Separated Cached (FAILED)

curl -vs -X PUT -H 'PRIVATE-TOKEN: redacted' \
--url 'https://gitlab.<redacted>/api/v4/projects/2934' \
--data 'ci_separated_caches=false'

Response Success
< HTTP/1.1 400 Bad Request
< Date: Sat, 14 Oct 2023 20:40:29 GMT
< Content-Type: application/json
< Content-Length: 1723
< Connection: keep-alive
< Cache-Control: no-cache
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< X-Request-Id: 01HCQYPHD4DZJX77FRG845VTD6
< X-Runtime: 0.031690
< Strict-Transport-Security: max-age=15724800; includeSubDomains
<
* Connection #0 to host gitlableft intact
{"error":"allow_merge_on_skipped_pipeline, analytics_access_level, 
autoclose_referenced_issues, auto_devops_enabled, auto_devops_deploy_strategy, 
auto_cancel_pending_pipelines, build_coverage_regex, build_git_strategy, 
build_timeout, builds_access_level, ci_config_path, ci_default_git_depth, 
ci_forward_deployment_enabled, container_registry_access_level, container_expiration_policy_attributes, 
default_branch, description, emails_disabled, forking_access_level, issues_access_level, 
lfs_enabled, merge_pipelines_enabled, merge_requests_access_level, merge_requests_template, 
merge_trains_enabled, merge_method, name, only_allow_merge_if_all_discussions_are_resolved, only_allow_merge_if_pipeline_succeeds, operations_access_level, pages_access_level, path, printing_merge_request_link_enabled, public_builds, remove_source_branch_after_merge, repository_access_level, request_access_enabled, resolve_outdated_diff_discussions, restrict_user_defined_variables, security_and_compliance_access_level, squash_option, shared_runners_enabled, snippets_access_level, tag_list, topics, visibility, wiki_access_level, avatar, suggestion_commit_message, merge_commit_template, squash_commit_template, repository_storage, compliance_framework_setting, packages_enabled, service_desk_enabled, keep_latest_artifact, mr_default_target_self, issues_enabled, jobs_enabled, merge_requests_enabled, wiki_enabled, snippets_enabled, container_registry_enabled, approvals_before_merge, external_authorization_classification_label, fallback_approvals_required, import_url, issues_template, merge_requests_template, merge_pipelines_enabled, merge_trains_enabled, 
requirements_access_level are missing, at least one parameter must be provided"}

0

There are 0 answers