UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Platform One
P
Party Bus
Valkyrie
valkyrie-api
Commits
59ffd78e
Commit
59ffd78e
authored
Jul 16, 2021
by
Jason van Brackel
Browse files
fix: fix merge conflicts
parents
41e7c40c
9faa2bfe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
4 deletions
+11
-4
controllers/gitlab/group_controller.go
controllers/gitlab/group_controller.go
+0
-2
controllers/gitlab/group_controller_test.go
controllers/gitlab/group_controller_test.go
+2
-2
controllers/gitlab/project_controller.go
controllers/gitlab/project_controller.go
+9
-0
No files found.
controllers/gitlab/group_controller.go
View file @
59ffd78e
...
...
@@ -52,8 +52,6 @@ const (
errorWhileUpdatingGroupState
=
"Error while updating group state in status"
errorUnableToSetupGitLabClient
=
"Error unable to setup GitLab client"
errorWhileUpdatingGitLabGroupCiVariables
=
"Error updating the GitLab group CI variables"
//errorGettingGroupVariablesFromGitLab = "Error getting group variables from GitLab"
//errorCreatingGroupVariableInGitLab = "Error creating group variable in GitLab"
)
// Group Status
...
...
controllers/gitlab/group_controller_test.go
View file @
59ffd78e
...
...
@@ -247,7 +247,7 @@ var _ = Describe("Reconcile", func() {
})
It
(
"should log the error"
,
func
()
{
Expect
(
logger
.
logLevelCalled
)
.
To
(
Equal
(
"Error"
))
//
Expect(logger.loggedMessage).To(Equal(errorWhileCreatingGit
L
abGroup))
Expect
(
logger
.
loggedMessage
)
.
To
(
Equal
(
errorWhileCreatingGit
l
abGroup
))
})
It
(
"should return an error"
,
func
()
{
Expect
(
err
)
.
NotTo
(
BeNil
())
...
...
@@ -271,7 +271,7 @@ var _ = Describe("Reconcile", func() {
})
It
(
"should log the error"
,
func
()
{
Expect
(
logger
.
logLevelCalled
)
.
To
(
Equal
(
"Error"
))
//
Expect(logger.loggedMessage).To(Equal(errorWhileUpdatingGit
L
abGroup))
Expect
(
logger
.
loggedMessage
)
.
To
(
Equal
(
errorWhileUpdatingGit
l
abGroup
))
})
It
(
"should return an error"
,
func
()
{
Expect
(
err
)
.
NotTo
(
BeNil
())
...
...
controllers/gitlab/project_controller.go
View file @
59ffd78e
...
...
@@ -199,10 +199,17 @@ func (r *ProjectReconciler) getGitLabProject(id int) (*gitlab.Project, error) {
func
(
r
*
ProjectReconciler
)
createGitLabProject
(
project
*
v1alpha1
.
Project
)
(
*
gitlab
.
Project
,
error
)
{
var
gitLabProject
*
gitlab
.
Project
var
err
error
autoCancelPendingPipelines
:=
"enabled"
ciForwardDeploymentEnabled
:=
true
publicBuilds
:=
true
createProjectOptions
:=
gitlab
.
CreateProjectOptions
{
Name
:
&
project
.
Spec
.
Name
,
Path
:
&
project
.
Spec
.
FullPath
,
CIConfigPath
:
&
project
.
Spec
.
CiConfigurationPath
,
AutoCancelPendingPipelines
:
&
autoCancelPendingPipelines
,
CIForwardDeploymentEnabled
:
&
ciForwardDeploymentEnabled
,
PublicBuilds
:
&
publicBuilds
,
}
if
gitLabProject
,
_
,
err
=
r
.
gitlabClient
.
AddProject
(
createProjectOptions
);
err
!=
nil
{
return
nil
,
err
...
...
@@ -218,6 +225,8 @@ func (r *ProjectReconciler) updateGitLabProject(id int, project *v1alpha1.Projec
Name
:
&
project
.
Spec
.
Name
,
Path
:
&
project
.
Spec
.
FullPath
,
CIConfigPath
:
&
project
.
Spec
.
CiConfigurationPath
,
CIForwardDeploymentEnabled
:
&
gitLabProject
.
CIForwardDeploymentEnabled
,
PublicBuilds
:
&
gitLabProject
.
PublicBuilds
,
});
err
!=
nil
{
return
nil
,
err
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment