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
d343b0a1
Commit
d343b0a1
authored
Jul 16, 2021
by
Jason van Brackel
Browse files
fix: crap that jvb screwed up
parent
d4b86680
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
controllers/gitlab/project_controller.go
controllers/gitlab/project_controller.go
+9
-10
No files found.
controllers/gitlab/project_controller.go
View file @
d343b0a1
...
...
@@ -121,7 +121,7 @@ func (r *ProjectReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ct
}
}
if
gitlabProject
,
err
=
r
.
updateGitlabProject
(
id
,
project
,
gitlabProject
);
err
!=
nil
{
if
gitlabProject
,
err
=
r
.
updateGitlabProject
(
id
,
project
,
gitlabProject
);
err
!=
nil
{
r
.
Log
.
Error
(
err
,
errorUpdatingGitlabProject
)
_
=
r
.
updateStatus
(
ctx
,
project
,
errorUpdatingGitlabProject
)
return
ctrl
.
Result
{
Requeue
:
true
},
err
...
...
@@ -204,12 +204,12 @@ func (r *ProjectReconciler) createGitlabProject(project *v1alpha1.Project) (*git
ciForwardDeploymentEnabled
:=
true
publicBuilds
:=
true
createProjectOptions
:=
gitlab
.
CreateProjectOptions
{
Name
:
&
project
.
Spec
.
Name
,
Path
:
&
project
.
Spec
.
FullPath
,
CIConfigPath
:
&
project
.
Spec
.
CiConfigurationPath
,
Name
:
&
project
.
Spec
.
Name
,
Path
:
&
project
.
Spec
.
FullPath
,
CIConfigPath
:
&
project
.
Spec
.
CiConfigurationPath
,
AutoCancelPendingPipelines
:
&
autoCancelPendingPipelines
,
CIForwardDeploymentEnabled
:
&
ciForwardDeploymentEnabled
,
PublicBuilds
:
&
publicBuilds
,
PublicBuilds
:
&
publicBuilds
,
}
if
gitLabProject
,
_
,
err
=
r
.
gitlabClient
.
AddProject
(
createProjectOptions
);
err
!=
nil
{
return
nil
,
err
...
...
@@ -221,13 +221,12 @@ func (r *ProjectReconciler) createGitlabProject(project *v1alpha1.Project) (*git
func
(
r
*
ProjectReconciler
)
updateGitlabProject
(
id
int
,
project
*
v1alpha1
.
Project
,
gitLabProject
*
gitlab
.
Project
)
(
*
gitlab
.
Project
,
error
)
{
var
err
error
if
gitLabProject
,
_
,
err
=
r
.
gitlabClient
.
UpdateProject
(
id
,
gitlab
.
EditProjectOptions
{
Name
:
&
project
.
Spec
.
Name
,
Path
:
&
project
.
Spec
.
FullPath
,
CIConfigPath
:
&
project
.
Spec
.
CiConfigurationPath
,
Name
:
&
project
.
Spec
.
Name
,
Path
:
&
project
.
Spec
.
FullPath
,
CIConfigPath
:
&
project
.
Spec
.
CiConfigurationPath
,
CIForwardDeploymentEnabled
:
&
gitLabProject
.
CIForwardDeploymentEnabled
,
PublicBuilds
:
&
gitLabProject
.
PublicBuilds
,
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