GitLab DevSecOps Platform
14 min
the gitlab connector allows for direct interaction with repositories and other resources within the gitlab devsecops ecosystem gitlab devsecops platform is a comprehensive suite for software development lifecycle management, including repository management, code review, issue tracking, and ci/cd pipelines this connector allows swimlane turbine users to automate interactions with gitlab, such as creating new files in repositories and retrieving repository archives by integrating with gitlab, security teams can streamline their development and security operations, ensuring code and infrastructure changes are implemented swiftly and securely within their automated workflows the connector simplifies the process of managing code changes and accessing repository data, enhancing collaboration and efficiency in devsecops practices prerequisites to utilize the gitlab devsecops platform connector in swimlane, ensure you have the following private token authentication with the following parameters url the base url of your gitlab instance (e g , ' https //gitlab com https //gitlab com ') private token your gitlab private token for api authentication capabilities this connector provides the following capabilities get repo archive create new file in repository asset setup the gitlab asset requires an private token for authentication configurations gitlab private token authentication authenticates using a private token configuration parameters parameter description type required url a url to the target host string required private token private token not required if repo is publicly accessible string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions create new file in repository creates a new file in a specified repository on gitlab using the provided branch, commit message, and content endpoint url api/v4/projects/{{id}}/repository/files/{{file path}} method post input argument name type required description id string required the id or url encoded path of the project owned by the authenticated user file path string required url encoded full path to new file branch string required name of the new branch to create the commit is added to this branch commit message string required the commit message content string required the files content author email string optional the commit authors email address author name string optional the commit authors name encoding string optional change encoding to base64 execute filemode boolean optional enables or disables the execute flag on the file start branch string optional name of the base branch to create the new branch from output parameter type description status code number http status code of the response reason string response reason phrase example \[ { "status code" 200, "reason" "ok", "response headers" {}, "json body" {} } ] get repository archive retrieve an archive of a repository from gitlab devsecops platform using the project id and specified format endpoint url /api/v4/projects/{{id}}/repository/archive {{format}} method get input argument name type required description id string required the id or url encoded path of the project owned by the authenticated user format string required name of the repository to download path string optional the subpath of the repository to download if an empty string, defaults to the whole repository sha string optional the commit sha to download a tag, branch reference, or sha can be used if not specified, defaults to the tip of the default branch output parameter type description file object output field file file string output field file file name string name of the resource example \[ { "file" { "file" "string", "file name" "example name" } } ] notes for more information on api documentation, check here https //docs gitlab com/ee/api/api resources html