Skip to content

Commit

Permalink
Merge pull request #48 from iLert/feature/deployment-pipeline-gitlab
Browse files Browse the repository at this point in the history
Feature/deployment pipeline gitlab
  • Loading branch information
STLVRTX authored Nov 29, 2024
2 parents 9c41c7c + cbf9ccd commit 8b3b3ac
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 29.11.2024, Version 3.11.1

- add type GitLab for deployment pipeline [#48](https://github.com/iLert/ilert-go/pull/48)

## 07.11.2024, Version 3.11.0

- add new resource deployment pipeline [#47](https://github.com/iLert/ilert-go/pull/47)
Expand Down
31 changes: 29 additions & 2 deletions deployment_pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ type DeploymentPipelineOutput struct {

// DeploymentPipelineParams defines settings for a deployment pipeline
type DeploymentPipelineOutputParams struct {
BranchFilters []string `json:"branchFilters,omitempty"` // used for GitHub
EventFilters []string `json:"eventFilters,omitempty"` // used for GitHub
BranchFilters []string `json:"branchFilters,omitempty"` // used for GitHub and GitLab
EventFilters []string `json:"eventFilters,omitempty"` // used for GitHub and GitLab
}

// DeploymentPipelineGitHubParams definition
Expand All @@ -46,19 +46,28 @@ type DeploymentPipelineGitHubParams struct {
EventFilters []string `json:"eventFilters,omitempty"`
}

// DeploymentPipelineGitLabParams definition
type DeploymentPipelineGitLabParams struct {
BranchFilters []string `json:"branchFilters,omitempty"`
EventFilters []string `json:"eventFilters,omitempty"`
}

// IntegrationType defines integration type
var DeploymentPipelineIntegrationType = struct {
Api string
GitHub string
GitLab string
}{
Api: "API",
GitHub: "GITHUB",
GitLab: "GITLAB",
}

// IntegrationTypeAll defines integration type list
var DeploymentPipelineIntegrationTypeAll = []string{
DeploymentPipelineIntegrationType.Api,
DeploymentPipelineIntegrationType.GitHub,
DeploymentPipelineIntegrationType.GitLab,
}

// GitHubEventFilterType defines github event filter type
Expand All @@ -79,6 +88,24 @@ var GitHubEventFilterTypeAll = []string{
GitHubEventFilterType.Release,
}

// GitLabEventFilterType defines gitlab event filter type
var GitLabEventFilterType = struct {
PushHook string
MergeRequestHook string
ReleaseHook string
}{
PushHook: "Push Hook",
MergeRequestHook: "Merge Request Hook",
ReleaseHook: "Release Hook",
}

// GitLabEventFilterTypeAll defines gitlab event filter type list
var GitLabEventFilterTypeAll = []string{
GitLabEventFilterType.PushHook,
GitLabEventFilterType.MergeRequestHook,
GitLabEventFilterType.ReleaseHook,
}

// CreateDeploymentPipelineInput represents the input of a CreateDeploymentPipeline operation.
type CreateDeploymentPipelineInput struct {
_ struct{}
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package ilert

// Version package version
const Version = "v3.11.0"
const Version = "v3.11.1"

0 comments on commit 8b3b3ac

Please sign in to comment.