UNCLASSIFIED

Commit 59ffd78e authored by Jason van Brackel's avatar Jason van Brackel
Browse files

fix: fix merge conflicts

parents 41e7c40c 9faa2bfe
......@@ -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
......
......@@ -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(errorWhileCreatingGitLabGroup))
Expect(logger.loggedMessage).To(Equal(errorWhileCreatingGitlabGroup))
})
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(errorWhileUpdatingGitLabGroup))
Expect(logger.loggedMessage).To(Equal(errorWhileUpdatingGitlabGroup))
})
It("should return an error", func() {
Expect(err).NotTo(BeNil())
......
......@@ -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
}
......
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