Skip to content

[Feature]: Support for repo contexts (ex gitlab ) #126

Open
@brunotorrente

Description

@brunotorrente

What would you like to be added?

Support for repo contexts (gitlab example)

Using the API it is possible to consult repos registered in codefresh, but the terraform provider does not support this context

API https://g.codefresh.io/api/contexts/gitlab

API response for git contexts

{
        "apiVersion": "v1",
        "kind": "context",
	"owner": "account",
	"metadata": {
		"default": true,
		"system": false,
		"name": "gitlab"
	},
	"spec": {
		"type": "git.gitlab",
		"data": {
			"sharingPolicy": "AllUsersInAccount",
			"auth": {
				"type": "basic",
				"password": "*****",
				"apiURL": "https://teste.com/api/v4/"
			},
			"behindFirewall": false,
			"sshClone": false,
			"secretStoreReferences": []
		}
	}
}

Would it be possible to add a data and resource to manage git repos in codefresh?

Exemple

resource "codefresh_context" "repos" {
    name = "gitlab"
    spec {
        git{ 
            gitlab {
                data = {
                   "auth_type = "basic"
                   "password" = "xxxxxx",
                   "apiURL" = "https://teste.com/api/v4/"
                   }
            }
    }
}

https://g.codefresh.io/api/#operation/repos-git-get-repo

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions