UNCLASSIFIED

Commit d343b0a1 authored by Jason van Brackel's avatar Jason van Brackel
Browse files

fix: crap that jvb screwed up

parent d4b86680
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment